Originally posted by @0xB10C in #160 (comment)
Hm the test still passed when async writing to the closed protocol. I think that should return an error too? At least it doesn't hang..
index 5b96eca..e7cb5d1 100644
--- a/protocol/tests/round_trips.rs
+++ b/protocol/tests/round_trips.rs
@@ -229,6 +229,10 @@ async fn pingpong_with_closed_connection_async() {
"Trying to read another message from the server, while the connection is already closed."
);
assert!(protocol.read().await.is_err());
+
+ let ping = V2NetworkMessage::new(NetworkMessage::Ping(45324));
+ let message = consensus::serialize(&ping);
+ protocol.write(&Payload::genuine(message)).await.unwrap();
}
#[test]
Probably a good followup once this is merged.
Tracking this here. I think writing to a closed connection should error too.
Originally posted by @0xB10C in #160 (comment)
Tracking this here. I think writing to a closed connection should error too.