summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ogClient.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ogClient.py b/src/ogClient.py
index 5fcb1c8..5fff77c 100644
--- a/src/ogClient.py
+++ b/src/ogClient.py
@@ -143,16 +143,20 @@ class ogClient:
if state == State.CONNECTING:
readset = [ sock ]
writeset = [ sock ]
+ exceptset = [ sock ]
elif state == State.FORCE_DISCONNECTED:
return 0
else:
readset = [ sock ]
writeset = [ ]
+ exceptset = [ ]
- readable, writable, exception = select.select(readset, writeset, [ ])
+ readable, writable, exception = select.select(readset, writeset, exceptset)
if state == State.CONNECTING and sock in writable:
self.connect2()
elif state == State.RECEIVING and sock in readable:
self.receive()
+ elif state == State.CONNECTING and sock in exception:
+ self.connect2()
else:
print('wrong state, not ever happen!' + str(state))