Fix panic in logging

Found by @ccampbell.
This commit is contained in:
Matt Joiner 2020-01-07 10:44:58 +11:00
parent e80834b899
commit c9f9235117
1 changed files with 1 additions and 1 deletions

View File

@ -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()