summaryrefslogtreecommitdiff
path: root/omegle.py
diff options
context:
space:
mode:
Diffstat (limited to 'omegle.py')
-rw-r--r--omegle.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/omegle.py b/omegle.py
index 5520f3f..395bf4b 100644
--- a/omegle.py
+++ b/omegle.py
@@ -177,6 +177,8 @@ class OmegleChat(RESTClient):
self.on_idle()
return
for data in data_set:
+ if not self.is_connected: #in case of disconnect
+ break #stop dispatching messages
if data[0] == "typing":
self.on_typing()
elif data[0] == "gotMessage" and data.__len__() == 2: