Tickle sleeping writers when closing connections
This prevents them sleeping for an indefinite period (although something seemed to wake them eventually).
This commit is contained in:
parent
e1ea10fa2d
commit
64d13d86a6
|
@ -232,6 +232,7 @@ func (cn *connection) Close() {
|
|||
if !cn.closed.Set() {
|
||||
return
|
||||
}
|
||||
cn.tickleWriter()
|
||||
cn.discardPieceInclination()
|
||||
cn.pieceRequestOrder.Clear()
|
||||
if cn.conn != nil {
|
||||
|
|
Loading…
Reference in New Issue