diff options
Diffstat (limited to 'omegle.py')
-rw-r--r-- | omegle.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -9,6 +9,7 @@ from threading import Thread, Lock class Timer(Thread): def __init__(self,func,interval=0.50): Thread.__init__(self) + self.logger = logging.getLogger(__name__ + "." + self.__class__.__name__) self.func = func self.interval = interval @@ -19,6 +20,7 @@ class Timer(Thread): while self.running: self.func() time.sleep(self.interval) + self.logger.debug("self.running == False") def stop(self): self.running = False @@ -59,8 +61,8 @@ class OmegleChat(object): self.timer.start() def disconnect(self): + self.logger.debug("/disconnect") self.timer.stop() - self.conn_lock.acquire() self.conn.request("POST", "/disconnect", @@ -69,6 +71,7 @@ class OmegleChat(object): r = self.conn.getresponse() self.conn_lock.release() body = r.read() + self.logger.debug("/disconnect sent. Read: %s" % body) if body == "win": self.is_connected = False else: |