From: Matt Joiner Date: Mon, 6 Jan 2020 23:44:58 +0000 (+1100) Subject: Fix panic in logging X-Git-Tag: v1.12.0~24 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=c9f92351177b5d8909f67f78268475267b38f089;p=btrtrc.git Fix panic in logging Found by @ccampbell. --- diff --git a/client.go b/client.go index 769a6a37..586f39bb 100644 --- a/client.go +++ b/client.go @@ -843,7 +843,7 @@ func (cl *Client) runReceivedConn(c *connection) { } if t == nil { torrent.Add("received handshake for unloaded torrent", 1) - t.logger.Printf("received handshake for unloaded torrent") + log.Fmsg("received handshake for unloaded torrent").AddValue(debugLogValue).Log(cl.logger) cl.lock() cl.onBadAccept(c.remoteAddr) cl.unlock()