Loading sjrpc/client/simple.py +6 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ import ssl import select import socket import logging from sjrpc.core import RpcConnection, ConnectionManager class SimpleRpcClient(ConnectionManager): Loading Loading @@ -82,6 +83,8 @@ class SimpleRpcClient(ConnectionManager): try: self._connection.receive() except socket.error as err: logging.error('Socket error while receiving from the client ' 'fd/%s: %s' % (fd, err)) self.shutdown() if event & select.EPOLLOUT: Loading @@ -89,9 +92,12 @@ class SimpleRpcClient(ConnectionManager): try: self._connection.send() except socket.error as err: logging.error('Socket error while sending to the client ' 'fd/%s: %s' % (fd, err)) self.shutdown() if event & select.EPOLLHUP: logging.error('Socket HUP fd/%s: %s' % (fd, err)) self.shutdown() #TODO def all_connections(self): Loading Loading
sjrpc/client/simple.py +6 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ import ssl import select import socket import logging from sjrpc.core import RpcConnection, ConnectionManager class SimpleRpcClient(ConnectionManager): Loading Loading @@ -82,6 +83,8 @@ class SimpleRpcClient(ConnectionManager): try: self._connection.receive() except socket.error as err: logging.error('Socket error while receiving from the client ' 'fd/%s: %s' % (fd, err)) self.shutdown() if event & select.EPOLLOUT: Loading @@ -89,9 +92,12 @@ class SimpleRpcClient(ConnectionManager): try: self._connection.send() except socket.error as err: logging.error('Socket error while sending to the client ' 'fd/%s: %s' % (fd, err)) self.shutdown() if event & select.EPOLLHUP: logging.error('Socket HUP fd/%s: %s' % (fd, err)) self.shutdown() #TODO def all_connections(self): Loading