diff --git a/bencode/decode.go b/bencode/decode.go index e90df6a2..2ab9c017 100644 --- a/bencode/decode.go +++ b/bencode/decode.go @@ -490,7 +490,6 @@ func (d *decoder) parse_value_interface() (interface{}, bool) { What: errors.New("unknown value type (invalid bencode?)"), }) } - panic("unreachable") } func (d *decoder) parse_int_interface() interface{} { diff --git a/client.go b/client.go index 72da2321..3eef1580 100644 --- a/client.go +++ b/client.go @@ -1064,7 +1064,7 @@ func (cl *Client) receiveHandshakes(c *connection) (t *torrent, err error) { } ih, ok, err := cl.connBTHandshake(c, nil) if err != nil { - fmt.Errorf("error during bt handshake: %s", err) + err = fmt.Errorf("error during bt handshake: %s", err) return } if !ok { diff --git a/dht/dht.go b/dht/dht.go index d60fd481..bd29ce64 100644 --- a/dht/dht.go +++ b/dht/dht.go @@ -596,7 +596,7 @@ func (s *Server) processPacket(b []byte, addr dHTAddr) { return } } - log.Printf("%s: received bad krpc message from %s: %s: %q", s, addr, err, b) + log.Printf("%s: received bad krpc message from %s: %s: %+q", s, addr, err, b) }() return }