madsim-rs / madsim

Magical Deterministic Simulator for distributed systems in Rust.
Apache License 2.0
648 stars 46 forks source link

fix local bind address #27

Closed wangrunji0408 closed 2 years ago

wangrunji0408 commented 2 years ago

Currently, if a socket binds 0.0.0.0, the network simulator will replace it with the node IP (e.g. 192.168.1.1), or panic if the node IP is uninitialized. The correct behavior is to keep the local address as 0.0.0.0 and store the remote address 192.168.1.1 for other nodes.