zeromq / zmq.rs

A native implementation of ØMQ in Rust
https://crates.io/crates/zeromq
MIT License
1.16k stars 100 forks source link

Handle codec errors in REQ socket recv #172

Closed nullsauce closed 1 year ago

nullsauce commented 2 years ago

Hey there. This PR handles codec errors when reading from a REQ socket and thus makes the code more resilient to abrupt changes in the underlying tcp connection. In my experience, it was relatively easy to make the panic happen during tests.

Not sure what's planned for the Some(Ok(_)) arm, so I've left it as todo().

Hope this helps. Please let me know if I should do anything particular with the PR. Cheers!