From: Matt Joiner Date: Thu, 12 Oct 2017 06:51:47 +0000 (+1100) Subject: If closing a connection Conn fails we can't do anything, and there's nothing to say X-Git-Tag: v1.0.0~366 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=7e857c875ecb8027c82b78b7951a92c5e47ef3b1;p=btrtrc.git If closing a connection Conn fails we can't do anything, and there's nothing to say --- diff --git a/connection.go b/connection.go index ba1d1e1e..faa7c922 100644 --- a/connection.go +++ b/connection.go @@ -230,14 +230,7 @@ func (cn *connection) Close() { cn.discardPieceInclination() cn.pieceRequestOrder.Clear() if cn.conn != nil { - go func() { - // TODO: This call blocks sometimes, why? Maybe it was the Go utp - // implementation? - err := cn.conn.Close() - if err != nil { - log.Printf("error closing connection net.Conn: %s", err) - } - }() + go cn.conn.Close() } }