From e86e609d6ca0b37a81fa60903d4a747fb73ccace Mon Sep 17 00:00:00 2001 From: occheung Date: Fri, 25 Sep 2020 12:26:49 +0800 Subject: [PATCH] tcp_stack: fix update_delay default value --- src/nal_tcp_client.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nal_tcp_client.rs b/src/nal_tcp_client.rs index 5e67962..314a60c 100644 --- a/src/nal_tcp_client.rs +++ b/src/nal_tcp_client.rs @@ -56,7 +56,7 @@ impl<'a, 'b, 'c, 'n> NetworkStack<'a, 'b, 'c, 'n> { self.network_interface.poll_delay( &mut self.sockets.borrow_mut(), net::time::Instant::from_millis(time as i64), - ).map_or(1000, |next_poll_time| next_poll_time.total_millis() as u32) + ).map_or(0, |next_poll_time| next_poll_time.total_millis() as u32) } pub fn update(&mut self, time: u32) -> bool {