Add is_loop method to RequestHandler for improved control flow

1 parent 0daf02dc
......@@ -227,6 +227,10 @@ class RequestHandler(BaseRequestHandler, CommonConnection):
log.info('Connection from {}:{}'.format(ip, port))
BaseRequestHandler.handle(self)
def is_loop(self):
sleep(0.1)
return self.running
def on_receive_raw(self, raw):
self.log_receive_raw(raw)
BaseRequestHandler.on_receive_raw(self, raw)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!