Fix control+c not working

This commit is contained in:
Ammar Askar committed 2012-09-12 05:11:58 +05:00
1 parent 9a715a72b8
commit 9b6a195b6a
2 files changed
+13 -1

No files matched your search

+7
View File
@@ -69,6 +69,10 @@ class ServerConnection(threading.Thread):
self.NoGUI = False
self.window = window
def disconnect(self):
self.listener.kill = True
self.socket.close()
def setWindow(self, window):
self.window = window
@@ -214,6 +218,7 @@ class PacketListener(threading.Thread):
self.FileObject = FileObject
self.window = window
self.encryptedConnection = False
self.kill = False
def enableEncryption(self):
#Create an AES cipher from the previously obtained public key
@@ -234,6 +239,8 @@ class PacketListener(threading.Thread):
def run(self):
while True:
if (self.kill):
break
try:
response = self.FileObject.read(1)
if (response == ""):