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
|
break
|
||||||
if len(self.read_buf) < self.expectBytes:
|
if len(self.read_buf) < self.expectBytes:
|
||||||
return False
|
return False
|
||||||
if getattr(self, "state_" + str(self.state))() is False:
|
if not getattr(self, "state_" + str(self.state))():
|
||||||
break
|
break
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
logger.error("Unknown state %s", self.state)
|
logger.error("Unknown state %s", self.state)
|
||||||
|
|
|
@ -61,7 +61,7 @@ class UDPSocket(BMProto):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def state_bm_command(self):
|
def state_bm_command(self):
|
||||||
BMProto.state_bm_command(self)
|
return BMProto.state_bm_command(self)
|
||||||
|
|
||||||
# disable most commands before doing research / testing
|
# disable most commands before doing research / testing
|
||||||
# only addr (peer discovery), error and object are implemented
|
# only addr (peer discovery), error and object are implemented
|
||||||
|
|
Loading…
Reference in New Issue
Block a user