diff options
author | amartin <olpc@xo-00-CE-12.localdomain> | 2007-07-09 18:14:27 (GMT) |
---|---|---|
committer | amartin <olpc@xo-00-CE-12.localdomain> | 2007-07-09 18:14:27 (GMT) |
commit | 9b1f5696ce87e1edaee5049d914800e697de7354 (patch) | |
tree | ae50f38775665c7a9f86474c798eced76813b9f8 /Util/Network.py | |
parent | 9a55157090cbdd9b568dcf5e126caf343a0cf545 (diff) |
network
Diffstat (limited to 'Util/Network.py')
-rw-r--r-- | Util/Network.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Util/Network.py b/Util/Network.py index 252bbe1..2e77068 100644 --- a/Util/Network.py +++ b/Util/Network.py @@ -72,14 +72,14 @@ class Listener( threading.Thread ): threading.Thread.__init__(self) self.owner = owner self.listenerSocket = listenerSocket - self.inputSockets = inputSockets - self.outputSockets = outputSockets - self.exceptSockets = exceptSockets + self.inputSockets = inputSockets[:] + self.outputSockets = outputSockets[:] + self.exceptSockets = exceptSockets[:] def updateSockets( self, inputSockets, outputSockets, exceptSockets ): - self.inputSockets = inputSockets - self.outputSockets = outputSockets - self.exceptSockets = exceptSockets + self.inputSockets = inputSockets[:] + self.outputSockets = outputSockets[:] + self.exceptSockets = exceptSockets[:] def run(self): while 1: # rely on the owner to kill us when necessary @@ -166,6 +166,7 @@ class Network: if self.listener: self.listenerSocket.sendto( "EXIT", ("localhost",LISTENER_PORT) ) + time.sleep(0.01) # get off the cpu so the listerer thread has a chance to clear.. IS THERE A BETTER WAY TO DO THIS? if self.mode == MD_HOST: for s in self.inputSockets: |