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
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