refactor: Use SHSDuplexStream.close instead of disconnect
`disconnect()` is now deprecated to make the API more consistent.
This commit is contained in:
parent
c2fffafa4e
commit
59c99097a2
@ -229,7 +229,7 @@ class PacketStream:
|
||||
|
||||
if not read_data:
|
||||
logger.debug("DISCONNECT")
|
||||
self.connection.disconnect()
|
||||
self.connection.close()
|
||||
|
||||
return None
|
||||
|
||||
@ -240,7 +240,8 @@ class PacketStream:
|
||||
return PSMessage.from_header_body(flags, req, body)
|
||||
except StopAsyncIteration:
|
||||
logger.debug("DISCONNECT")
|
||||
self.connection.disconnect()
|
||||
self.connection.close()
|
||||
|
||||
return None
|
||||
|
||||
async def read(self) -> Optional[PSMessage]:
|
||||
@ -314,4 +315,4 @@ class PacketStream:
|
||||
"""Disconnect the stream"""
|
||||
|
||||
self._connected = False
|
||||
self.connection.disconnect()
|
||||
self.connection.close()
|
||||
|
Loading…
Reference in New Issue
Block a user