Loading ccnode/node.py +16 −7 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ from collections import defaultdict from functools import partial import pyev from sjrpc.core import RpcConnection from sjrpc.core import RpcConnection, RpcError from sjrpc.utils import ConnectionProxy, RpcHandler, threadless from ccnode import __version__ Loading Loading @@ -106,12 +106,21 @@ class RPCStartHandler(Thread): return # try to authenticate try: self.auth_id = self.rpc_con.rpc.async_call_cb( self.auth_done_cb, 'authentify', self.loop.config.server_user, self.loop.config.server_passwd, ) except RpcError as exc: if exc.exception == 'RpcConnectionError': logger.error('Authentication failed: connection lost') else: logger.exception('Unexpected exception while authenticating') self.stop() self.loop.restart_rpc_connection() def auth_done_cb(self, call_id, response=None, error=None): assert call_id == self.auth_id Loading Loading
ccnode/node.py +16 −7 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ from collections import defaultdict from functools import partial import pyev from sjrpc.core import RpcConnection from sjrpc.core import RpcConnection, RpcError from sjrpc.utils import ConnectionProxy, RpcHandler, threadless from ccnode import __version__ Loading Loading @@ -106,12 +106,21 @@ class RPCStartHandler(Thread): return # try to authenticate try: self.auth_id = self.rpc_con.rpc.async_call_cb( self.auth_done_cb, 'authentify', self.loop.config.server_user, self.loop.config.server_passwd, ) except RpcError as exc: if exc.exception == 'RpcConnectionError': logger.error('Authentication failed: connection lost') else: logger.exception('Unexpected exception while authenticating') self.stop() self.loop.restart_rpc_connection() def auth_done_cb(self, call_id, response=None, error=None): assert call_id == self.auth_id Loading