We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
func (server *Server) ServeConn(conn io.ReadWriteCloser) { defer func() { _ = conn.Close() }() // .... } func (server *Server) serveCodec(cc codec.Codec) { sending := new(sync.Mutex) // make sure to send a complete response wg := new(sync.WaitGroup) // wait until all request are handled for { //... } wg.Wait() _ = cc.Close() // 这里 }
gobCodec的close 直接调用了conn.close 这里好像多次调用了conn的close?
stackOverflow的讨论
似乎这样会出问题,我想应该有两种解决方案
希望解惑 谢谢
The text was updated successfully, but these errors were encountered:
No branches or pull requests
gobCodec的close 直接调用了conn.close
这里好像多次调用了conn的close?
stackOverflow的讨论
似乎这样会出问题,我想应该有两种解决方案
希望解惑 谢谢
The text was updated successfully, but these errors were encountered: