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() {
|
if !cn.closed.Set() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
cn.tickleWriter()
|
||||||
cn.discardPieceInclination()
|
cn.discardPieceInclination()
|
||||||
cn.pieceRequestOrder.Clear()
|
cn.pieceRequestOrder.Clear()
|
||||||
if cn.conn != nil {
|
if cn.conn != nil {
|
||||||
|
|
Loading…
Reference in New Issue