summaryrefslogtreecommitdiffstats
path: root/notFinishedCode
diff options
context:
space:
mode:
authorRefik Hadzialic2011-07-16 17:22:47 +0200
committerRefik Hadzialic2011-07-16 17:22:47 +0200
commitba3fad1d674f5b1f681f4b60179778dee98fc301 (patch)
tree5b7d3287066d552e5e426bfaa6666f477a546e1b /notFinishedCode
parentAdded an error handling for other side disconnecting and this side trying to ... (diff)
downloadgsm-selftest-ba3fad1d674f5b1f681f4b60179778dee98fc301.tar.gz
gsm-selftest-ba3fad1d674f5b1f681f4b60179778dee98fc301.tar.xz
gsm-selftest-ba3fad1d674f5b1f681f4b60179778dee98fc301.zip
Addded an error handling code for the Server class, for other side disconnect!
Diffstat (limited to 'notFinishedCode')
-rw-r--r--notFinishedCode/ServerClass.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/notFinishedCode/ServerClass.py b/notFinishedCode/ServerClass.py
index e332025..b772f0a 100644
--- a/notFinishedCode/ServerClass.py
+++ b/notFinishedCode/ServerClass.py
@@ -70,6 +70,9 @@ class ServerHandler:
print traceback.format_exc()
print e
self.connected = 0
+ if error[0:11] == '[Errno 104]':
+ return 3 #the other side reset the connection,[Errno 104] Connection reset by peer
+
return 2
else:
return 0