예제 #1
0
 def close(self):
     if self._socket is not None:
         try:
             self._socket.shutdown(socket.SHUT_RDWR)
             self._socket.close()
         except Exception as ex:
             default_logger.error(ex.message)
         finally:
             self._socket = None
예제 #2
0
 def close(self):
     if self.is_open():
         try:
             self._socket.shutdown(socket.SHUT_RDWR)
             self._socket.close()
         except ReqlError as exc:
             default_logger.error(exc.message)
         except Exception as exc:
             default_logger.error(exc)
         finally:
             self._socket = None