]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Triage a possible bug blocking while closing UTPConns
authorMatt Joiner <anacrolix@gmail.com>
Wed, 19 Nov 2014 03:53:57 +0000 (21:53 -0600)
committerMatt Joiner <anacrolix@gmail.com>
Wed, 19 Nov 2014 03:53:57 +0000 (21:53 -0600)
connection.go

index ddd2364d8aa16dbf093c06de86c2b907e1ba8e0d..c1f337fc8cba35b0fcdf9ce3a5c8622156f7aedf 100644 (file)
@@ -174,7 +174,8 @@ func (c *connection) Close() {
        default:
        }
        close(c.closing)
-       c.Socket.Close()
+       // TODO: This call blocks sometimes, why?
+       go c.Socket.Close()
 }
 
 func (c *connection) PeerHasPiece(index pp.Integer) bool {