diff --git a/frappy_psi/sea.py b/frappy_psi/sea.py index c437a4e..bf294f7 100644 --- a/frappy_psi/sea.py +++ b/frappy_psi/sea.py @@ -227,6 +227,10 @@ class SeaClient(ProxyClient, Module): else: result.append(reply) except ConnectionClosed: + try: + self.syncio.disconnect() + except Exception: + pass self.syncio = None raise TimeoutError('no response within 10s') @@ -238,9 +242,10 @@ class SeaClient(ProxyClient, Module): continue except ConnectionClosed: try: - self.asynio.close() + self.asynio.disconnect() except Exception: - self.asynio = None + pass + self.asynio = None break try: msg = json.loads(reply)