Attempt to fix the double say and disconnect bug, thanks to theli-ua and tanto

master
Sean B. Palmer 2012-05-07 21:33:19 +01:00
parent 0908b6a61d
commit 8a0d0dd9f0
1 changed files with 5 additions and 0 deletions

5
irc.py
View File

@ -42,6 +42,11 @@ class Bot(asynchat.async_chat):
import threading
self.sending = threading.RLock()
def initiate_send(self):
self.sending.acquire()
asynchat.async_chat.initiate_send(self)
self.sending.release()
# def push(self, *args, **kargs):
# asynchat.async_chat.push(self, *args, **kargs)