From 5049f5d3754c6a3193f38a0e3883a19bf640b038 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Fri, 27 Mar 2015 15:37:58 +1100 Subject: [PATCH] More unnecessary log shushing --- client.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/client.go b/client.go index cc83037d..d525b56f 100644 --- a/client.go +++ b/client.go @@ -1104,11 +1104,11 @@ func (me *Client) initiateHandshakes(c *connection, t *torrent) (ok bool, err er return } +// Do encryption and bittorrent handshakes as receiver. func (cl *Client) receiveHandshakes(c *connection) (t *torrent, err error) { cl.mu.Lock() skeys := cl.receiveSkeys() cl.mu.Unlock() - // TODO: Filter unmatching skey errors. c.rw, c.encrypted, err = maybeReceiveEncryptedHandshake(c.rw, skeys) if err != nil { if err == mse.ErrNoSecretKeyMatch { @@ -1162,8 +1162,7 @@ func (cl *Client) runReceivedConn(c *connection) (err error) { } t, err := cl.receiveHandshakes(c) if err != nil { - logonce.Stderr.Printf("error receiving handshakes: %s", err) - err = nil + err = fmt.Errorf("error receiving handshakes: %s", err) return } if t == nil {