Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit abd4b50

Browse files
committed
Fix log race
1 parent 3d0f7ad commit abd4b50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

peer/conn.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ func (c *Conn) CloseWithError(err error) error {
584584
// All logging, goroutines, and async functionality is cleaned up after this.
585585
c.dcClosedWaitGroup.Wait()
586586

587-
close(c.closed)
588587
c.opts.Logger.Debug(context.Background(), "closed")
588+
close(c.closed)
589589
return err
590590
}

0 commit comments

Comments
 (0)