Skip to content

Commit

Permalink
Added more output on DHT handshake
Browse files Browse the repository at this point in the history
  • Loading branch information
crioto committed Mar 2, 2018
1 parent 2706c1a commit 62670c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions dht.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ func (dht *DHTRouter) routeData(data []byte) {
}
}
if !dht.handshaked {
ptp.Log(ptp.Trace, "Skipping packet: not handshaked")
return
}
dht.data <- packet
Expand Down
4 changes: 3 additions & 1 deletion lib/p2p.go
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,9 @@ func (p *PeerToPeer) Close() error {

if p.Interface != nil {
err := p.Interface.Close()
Log(Error, "Failed to close TAP interface: %s", err)
if err != nil {
Log(Error, "Failed to close TAP interface: %s", err)
}
}
p.ReadyToStop = true
Log(Info, "Instance %s stopped", hash)
Expand Down

0 comments on commit 62670c6

Please sign in to comment.