mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 16:10:57 +00:00
Merge pull request #310 from mhchia/fix/missing_await_for_stream_reset_in_pubsub
Add the missing `await` for `stream.reset` in pubsub
This commit is contained in:
@ -245,7 +245,7 @@ class Pubsub:
|
|||||||
await self.continuously_read_stream(stream)
|
await self.continuously_read_stream(stream)
|
||||||
except (StreamEOF, StreamReset) as error:
|
except (StreamEOF, StreamReset) as error:
|
||||||
logger.debug("fail to read from stream, error=%s", error)
|
logger.debug("fail to read from stream, error=%s", error)
|
||||||
stream.reset()
|
await stream.reset()
|
||||||
# TODO: what to do when the stream is terminated?
|
# TODO: what to do when the stream is terminated?
|
||||||
# disconnect the peer?
|
# disconnect the peer?
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user