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"])
|
await self.request("register", peer_id=self.config["appservice.address"])
|
||||||
|
|
||||||
async def disconnect(self) -> None:
|
async def disconnect(self) -> None:
|
||||||
assert self._writer is not None
|
if self._writer is not None:
|
||||||
self._writer.write_eof()
|
self._writer.write_eof()
|
||||||
await self._writer.drain()
|
await self._writer.drain()
|
||||||
self._writer = None
|
self._writer = None
|
||||||
self._reader = None
|
self._reader = None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def _next_req_id(self) -> int:
|
def _next_req_id(self) -> int:
|
||||||
|
Loading…
Reference in New Issue
Block a user