-
Notifications
You must be signed in to change notification settings - Fork 208
Open
Description
Issue
When using the zmq crate (version 0.10.0) on Windows, calling unbind on an IPC socket works correctly in debug mode (cargo run) but fails in release mode (cargo run --release). The code panics with:
called `Result::unwrap()` on an `Err` value: No such file or directory
This seems to indicate that unbind cannot find the path, despite it being the exact same path used in the preceding bind call.
Platform
- OS: Windows
- Crate version:
zmq = "0.10.0" - Rust: stable
- Transport: IPC
Reproduction
fn main() {
let context = zmq::Context::new();
let socket_path = "ipc://test_soc";
let responder = context.socket(zmq::REP).unwrap();
responder.bind(socket_path).unwrap();
responder.unbind(socket_path).unwrap(); // <- fails in release mode
}Cargo.toml
[dependencies]
zmq = "0.10.0"Steps to reproduce
-
Run in debug mode (works fine):
cargo run -
Run in release mode (fails):
cargo run --release
Expected Behavior
unbind should succeed in release mode just like it does in debug mode, using the same code and socket path.
Additional Notes
- This might relate to compiler optimizations, IPC path handling on Windows, or a race condition exposed only in release builds.
- The behavior is consistent and reproducible.
- If I try this with TCP, inproc, it works.
- If I try this using C++, it works.
Please let me know if further diagnostics or logs are needed.
Metadata
Metadata
Assignees
Labels
No labels