Log who's giving us zero ports over PEX

In the long run this will help determine why this happens.
This commit is contained in:
Matt Joiner 2015-08-06 08:55:48 +10:00
parent 502a7ebebd
commit 59e50bd614
1 changed files with 4 additions and 0 deletions

View File

@ -1662,6 +1662,10 @@ func (me *Client) connectionLoop(t *torrent, c *connection) error {
me.mu.Lock()
me.addPeers(t, func() (ret []Peer) {
for i, cp := range pexMsg.Added {
if cp.Port == 0 {
log.Printf("peer gave zero port peer over PEX\n\t%s", c)
continue
}
p := Peer{
IP: make([]byte, 4),
Port: int(cp.Port),