diff --git a/sjrpc/core/rpcconnection.py b/sjrpc/core/rpcconnection.py index be7515667fa3524206969f3c6f418feb6f0455f2..4f0facc43eab7fe14c4febc57abd9f0c457476d9 100644 --- a/sjrpc/core/rpcconnection.py +++ b/sjrpc/core/rpcconnection.py @@ -350,7 +350,10 @@ class RpcConnection(object): :type callback: :class:`str` or callable or None ''' - self._sock.close() + try: + self._sock.close() + except socket.error as err: + logging.warning('Error while socket close: %s.', err) # Release all running calls from this connection: for call in self._calls.values():