Several trivial fixes

This commit is contained in:
Matt Joiner 2015-06-28 16:39:04 +10:00
parent b1bacc5c3a
commit 4f293ca75b
3 changed files with 2 additions and 3 deletions

View File

@ -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{} {

View File

@ -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 {

View File

@ -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
}