p2p: fix a merge issue, address Felix's review

This commit is contained in:
Péter Szilágyi 2015-04-30 16:55:07 +03:00
parent e0d0a25cd7
commit b2685aad2a
2 changed files with 1 additions and 3 deletions

View file

@ -73,7 +73,6 @@ const (
DiscSelf DiscSelf
DiscReadTimeout DiscReadTimeout
DiscSubprotocolError DiscSubprotocolError
DiscThrottled
) )
var discReasonToString = [...]string{ var discReasonToString = [...]string{
@ -90,7 +89,6 @@ var discReasonToString = [...]string{
DiscSelf: "Connected to self", DiscSelf: "Connected to self",
DiscReadTimeout: "Read timeout", DiscReadTimeout: "Read timeout",
DiscSubprotocolError: "Subprotocol error", DiscSubprotocolError: "Subprotocol error",
DiscThrottled: "Node throttled",
} }
func (d DiscReason) String() string { func (d DiscReason) String() string {

View file

@ -616,7 +616,7 @@ func (srv *Server) checkPeer(id discover.NodeID) (bool, DiscReason) {
case id == srv.ntab.Self().ID: case id == srv.ntab.Self().ID:
return false, DiscSelf return false, DiscSelf
case srv.throttle[id]: case srv.throttle[id]:
return false, DiscThrottled return false, DiscUselessPeer
default: default:
return true, 0 return true, 0
} }