diff options
Diffstat (limited to 'omegle.py')
-rw-r--r-- | omegle.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -155,7 +155,7 @@ class OmegleChat(RESTClient): try: data_set=json.read(body.decode("utf8")) if not data_set: - self.logger.debug("event: no data received") + self.on_idle() return for data in data_set: if data[0] == "typing": @@ -179,6 +179,8 @@ class OmegleChat(RESTClient): except json.ReadException: self.logger.error("Json ReadException. Body: %s" % body) + def on_idle(self): + self.logger.debug("event: no data received") def on_message(self,message): """To be overwritten""" self.logger.info("<<< %s" % message) |