CPU hogging fix
- handle _command functions that don't return anything - fix udp command function
This commit is contained in:
parent
c9851b9f41
commit
ba91d21261
|
@ -58,7 +58,7 @@ class AdvancedDispatcher(asyncore.dispatcher):
|
|||
break
|
||||
if len(self.read_buf) < self.expectBytes:
|
||||
return False
|
||||
if getattr(self, "state_" + str(self.state))() is False:
|
||||
if not getattr(self, "state_" + str(self.state))():
|
||||
break
|
||||
except AttributeError:
|
||||
logger.error("Unknown state %s", self.state)
|
||||
|
|
|
@ -61,7 +61,7 @@ class UDPSocket(BMProto):
|
|||
pass
|
||||
|
||||
def state_bm_command(self):
|
||||
BMProto.state_bm_command(self)
|
||||
return BMProto.state_bm_command(self)
|
||||
|
||||
# disable most commands before doing research / testing
|
||||
# only addr (peer discovery), error and object are implemented
|
||||
|
|
Loading…
Reference in New Issue
Block a user