From 64d13d86a6ba04269e2abacedcdd890165901010 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Sat, 3 Feb 2018 15:44:03 +1100 Subject: [PATCH] Tickle sleeping writers when closing connections This prevents them sleeping for an indefinite period (although something seemed to wake them eventually). --- connection.go | 1 + 1 file changed, 1 insertion(+) diff --git a/connection.go b/connection.go index 1e7ef968..ada84b8e 100644 --- a/connection.go +++ b/connection.go @@ -232,6 +232,7 @@ func (cn *connection) Close() { if !cn.closed.Set() { return } + cn.tickleWriter() cn.discardPieceInclination() cn.pieceRequestOrder.Clear() if cn.conn != nil {