fix: succesfull echo example completed

This commit is contained in:
Akash Mondal
2025-07-01 12:24:57 +00:00
committed by lla-dane
parent 8f0cdc9ed4
commit 6c45862fe9
8 changed files with 199 additions and 83 deletions

View File

@ -1,3 +1,5 @@
from builtins import AssertionError
from libp2p.abc import (
IMultiselectCommunicator,
)
@ -36,7 +38,8 @@ class MultiselectCommunicator(IMultiselectCommunicator):
msg_bytes = encode_delim(msg_str.encode())
try:
await self.read_writer.write(msg_bytes)
except IOException as error:
# Handle for connection close during ongoing negotiation in QUIC
except (IOException, AssertionError, ValueError) as error:
raise MultiselectCommunicatorError(
"fail to write to multiselect communicator"
) from error