Skip to content

Commit

Permalink
bug: fix the data race among asynchronous methods
Browse files Browse the repository at this point in the history
  • Loading branch information
panjf2000 committed May 24, 2023
1 parent bdcc30c commit daffb4e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions connection_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,10 @@ func newTCPConn(nc net.Conn, el *eventloop) (c *conn) {
func (c *conn) release() {
c.ctx = nil
c.localAddr = nil
c.remoteAddr = nil
c.rawConn = nil
if c.rawConn != nil {
c.rawConn = nil
c.remoteAddr = nil
}
c.inboundBuffer.Done()
bbPool.Put(c.buffer)
c.buffer = nil
Expand Down

0 comments on commit daffb4e

Please sign in to comment.