148 "ExceptionValue": str(excval), |
148 "ExceptionValue": str(excval), |
149 "Traceback": tbinfo, |
149 "Traceback": tbinfo, |
150 }) |
150 }) |
151 |
151 |
152 # Give time to process latest response on server side |
152 # Give time to process latest response on server side |
153 self.__connection.shutdown(socket.SHUT_RDWR) |
153 try: |
154 self.__connection.close() |
154 self.__connection.shutdown(socket.SHUT_RDWR) |
|
155 self.__connection.close() |
|
156 except (socket.error, OSError): |
|
157 # ignore these; socket might be closed already |
|
158 pass |
155 |
159 |
156 def poll(self, waitMethod=""): |
160 def poll(self, waitMethod=""): |
157 """ |
161 """ |
158 Public method to check and receive one message (if available). |
162 Public method to check and receive one message (if available). |
159 |
163 |