rein's Issues
如题? 多端口应该如何设置? 单一端口测试无问题!而且速度不行!
发现配置文件不能添加注释,如果配置了很多端口没有添加注释的话看配置文件会不太方便
在服务器上部署服务端
{
"inps": [
{"ctrl": "0.0.0.0:40001"},
{"ctrl": "0.0.0.0:40002"},
{"ctrl": "0.0.0.0:40003"},
{"ctrl": "0.0.0.0:40004"},
{"ctrl": "0.0.0.0:40005"}
]
}
然后启动,
随便一台机器。然后执行telnet x.x.x.x 40001
然后直接Ctrl+c,就能直接杀死服务端的rein程序。
报错日志
2023/06/09 11:12:36 connRecvDealOnce link in ok ...
panic: runtime error: slice bounds out of range
goroutine 21 [running]:
main.coroutineInpsObj.run(0x800, 0xc000074370, 0xd)
/home/rein/src/coroutine_inps.go:105 +0x884
created by main.commandDealObj.modelInpsDeal
/home/rein/src/command_deal.go:174 +0x25a
command-line-arguments
.\main.go:30:2: undefined: commandDeal
1、当其中一个连接发生错误的时候会造成整理程序挂掉,从而影响了其它正常的连接,这样很不人道。
2、没有后台启动方式,有些不太好
3、修改配置后能否做到不重启?
故障描述
服务器端使用inps 模式,工作在17500端口。当使用 nc -zv <server_ip>:17500 测试服务器端的端口是否可达时,第一次返回 Connection to x.x.x.x port 17500 [tcp/*] succeeded! 当再次使用同样的nc 命令测试时,直接返回connectx to x.x.x.x port 17500 (tcp) failed: Connection refused,此时inps 服务器端出现如下错误,导致直接崩溃:
2020/03/30 22:49:26 flag: 0 n: 0 buffers: 1
2020/03/30 22:49:26 flag: -1 n: 0 buffers: 1
2020/03/30 22:49:26 srvConnRight: c00001ccc0 close.
2020/03/30 22:49:26 srvConnLeft: c00001ccb0 close.
2020/03/30 22:49:58 netListen.Accept ok!, conn id: c0000f2100
2020/03/30 22:49:58 ctrlServConn link in ok ...
2020/03/30 22:49:58 conn: c00001d0d0 close.
2020/03/30 22:49:58 connRecvDealOnce link in ok ...
panic: runtime error: slice bounds out of range
goroutine 6 [running]:
main.coroutineInpsObj.run(0x800, 0xc0000123f0, 0xd)
/home/rein/src/coroutine_inps.go:105 +0x884
created by main.commandDealObj.modelInpsDeal
/home/rein/src/command_deal.go:174 +0x25a