mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 16:10:57 +00:00
fix: succesfull echo
This commit is contained in:
@ -966,7 +966,7 @@ class QUICConnection(IRawConnection, IMuxedConn):
|
||||
self, event: events.ConnectionTerminated
|
||||
) -> None:
|
||||
"""Handle connection termination."""
|
||||
logger.debug(f"QUIC connection terminated: {event.reason_phrase}")
|
||||
print(f"QUIC connection terminated: {event.reason_phrase}")
|
||||
|
||||
# Close all streams
|
||||
for stream in list(self._streams.values()):
|
||||
|
||||
@ -360,10 +360,6 @@ class QUICStream(IMuxedStream):
|
||||
return
|
||||
|
||||
try:
|
||||
# Signal read closure to QUIC layer
|
||||
self._connection._quic.reset_stream(self._stream_id, error_code=0)
|
||||
await self._connection._transmit()
|
||||
|
||||
self._read_closed = True
|
||||
|
||||
async with self._state_lock:
|
||||
@ -590,6 +586,7 @@ class QUICStream(IMuxedStream):
|
||||
exc_tb: TracebackType | None,
|
||||
) -> None:
|
||||
"""Exit the async context manager and close the stream."""
|
||||
print("Exiting the context and closing the stream")
|
||||
await self.close()
|
||||
|
||||
def set_deadline(self, ttl: int) -> bool:
|
||||
|
||||
Reference in New Issue
Block a user