Skip to content

slirp_update_timeout: Fix handling of *timeout = 0

Rafael Gieschke requested to merge rafaelgieschke/libslirp:fix-timeout into master

libslirp-rs in actually sets *timeout = 0 before calling slirp_pollfds_fill().

Currently, this results in *timeout staying at 0 and all (TCP) timeouts never firing on their own (they will only fire randomly if a file descriptor becomes ready eventually).

You could, alternatively, argue that libslirp-rs should let mut timeout = u32::MAX but 0 seems like a more reasonable default value for timeout.

Signed-off-by: Rafael Gieschke

Merge request reports