Don't log extension message parsing errors from -SD0100-
This commit is contained in:
parent
daa3df5f7b
commit
2b360b641c
@ -17,6 +17,7 @@ package torrent
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"bytes"
|
||||
"container/heap"
|
||||
"crypto/rand"
|
||||
"crypto/sha1"
|
||||
@ -921,7 +922,12 @@ func (me *Client) connectionLoop(t *torrent, c *connection) error {
|
||||
err = fmt.Errorf("unexpected extended message ID: %v", msg.ExtendedID)
|
||||
}
|
||||
if err != nil {
|
||||
log.Printf("peer extension map: %#v", c.PeerExtensionIDs)
|
||||
// That client uses its own extension IDs for outgoing message
|
||||
// types, which is incorrect.
|
||||
if bytes.HasPrefix(c.PeerID[:], []byte("-SD0100-")) {
|
||||
return nil
|
||||
}
|
||||
// log.Printf("peer extension map: %#v", c.PeerExtensionIDs)
|
||||
}
|
||||
case pp.Port:
|
||||
if me.dHT == nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user