summaryrefslogtreecommitdiff
path: root/omegle.py
diff options
context:
space:
mode:
Diffstat (limited to 'omegle.py')
-rw-r--r--omegle.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/omegle.py b/omegle.py
index 4f5e327..422c587 100644
--- a/omegle.py
+++ b/omegle.py
@@ -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)