Andy Pan
Andy Pan
> Is there a planned time to accept this PR? This PR is still in ***WIP*** status, I'd love to review it once @leki75 finishes it.
Move to #578
频繁发生?
有看到 `error occurs in event-loop: ` 的错误日志吗?没有的话应该是你在 OnTraffic() 里 return Shutdown 导致的。
OnClose() 和 OnTick() 里有没有返回 Shutdown?或者其他可能的地方,你全局搜一下 `Shutdown` 看看?一般来说这个错误是人为触发的,你看看你自己的业务代码有没有哪里有错误日志?
暂时想不到还有什么情况会出现这种情况。你能提供一下能复现这个问题的 demo 代码吗?
> gnet服务启动是在一个协程内启动的,单独的gnet shutdown会导致整个进程断掉吗 什么意思?你是主动调用了 [gnet.Stop](https://pkg.go.dev/github.com/panjf2000/gnet/v2#Stop) 方法吗?
> > > gnet服务启动是在一个协程内启动的,单独的gnet shutdown会导致整个进程断掉吗 > > > > > > 什么意思?你是主动调用了 [gnet.Stop](https://pkg.go.dev/github.com/panjf2000/gnet/v2#Stop) 方法吗? > > 没主动调用 gnet.Stop方法,项目设计的gnet部分代码全部在上面了,上面的 InitPtrServer() 是 go InitPtrServer() 通过协程方式启动的,[email protected]/reactor_default_linux.go:124 event-loop(6) is exiting due to error: server...
我准备优化一下错误打印这部分代码,把相应的堆栈信息也一起打印出来,这样后续定位问题更准确,至于你这个情况,麻烦你持续观察下,如果后面还有复现再一起来看看,谢谢。
From my point of view, it doesn't seem worthwhile to cost one extra memory copy for every `bind` of a `struct`, just for a rare scenario. I wonder if there...