net,loopback: small fix
authorAdam Turowski <adam.turowski@inf.ethz.ch>
Fri, 14 Jul 2017 13:52:04 +0000 (15:52 +0200)
committerAdam Turowski <adam.turowski@inf.ethz.ch>
Fri, 14 Jul 2017 13:52:04 +0000 (15:52 +0200)
Signed-off-by: Adam Turowski <adam.turowski@inf.ethz.ch>

lib/net/net.c

index d6edc0f..8eb6af0 100644 (file)
@@ -87,10 +87,8 @@ void net_lwip_timeout(void)
 {
     errval_t err;
 
-    deferred_event_cancel(&net_lwip_timer);
-
     sys_check_timeouts();
-
+    deferred_event_cancel(&net_lwip_timer);
     uint32_t delay = sys_timeouts_sleeptime();
     if (delay != 0xffffffff) {
         err = deferred_event_register(&net_lwip_timer, get_default_waitset(),