Permalink
Browse files

reenabled bad peer banning. no longer ban for arbitrary exceptions, t…

…hough
  • Loading branch information...
1 parent 1664396 commit 309110c0cfe8b86e109c89255118d14cd87437e2 @forrestv forrestv committed Oct 12, 2012
Showing with 1 addition and 3 deletions.
  1. +0 −2 p2pool/p2p.py
  2. +1 −1 p2pool/util/p2protocol.py
View
@@ -70,12 +70,10 @@ def packetReceived(self, command, payload2):
raise PeerMisbehavingError('first message was not version message')
p2protocol.Protocol.packetReceived(self, command, payload2)
except PeerMisbehavingError, e:
- return
print 'Peer %s:%i misbehaving, will drop and ban. Reason:' % self.addr, e.message
self.badPeerHappened()
def badPeerHappened(self):
- return
if p2pool.DEBUG:
print "Bad peer banned:", self.addr
self.transport.loseConnection()
@@ -67,7 +67,7 @@ def dataReceiver(self):
except:
print 'RECV', command, payload[:100].encode('hex') + ('...' if len(payload) > 100 else '')
log.err(None, 'Error handling message: (see RECV line)')
- self.badPeerHappened()
+ self.transport.loseConnection()
def packetReceived(self, command, payload2):
handler = getattr(self, 'handle_' + command, None)

0 comments on commit 309110c

Please sign in to comment.