Prevent crash when quitting Python module after Node module
This commit is contained in:
parent
dc02fbe33a
commit
b9eb4ce0ac
|
@ -83,11 +83,11 @@ class RPCClient:
|
|||
await self.request("register", peer_id=self.config["appservice.address"])
|
||||
|
||||
async def disconnect(self) -> None:
|
||||
assert self._writer is not None
|
||||
self._writer.write_eof()
|
||||
await self._writer.drain()
|
||||
self._writer = None
|
||||
self._reader = None
|
||||
if self._writer is not None:
|
||||
self._writer.write_eof()
|
||||
await self._writer.drain()
|
||||
self._writer = None
|
||||
self._reader = None
|
||||
|
||||
@property
|
||||
def _next_req_id(self) -> int:
|
||||
|
|
Loading…
Reference in New Issue