mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
remove vtimer object before (re)scheduling it
This commit is contained in:
parent
28624aa37b
commit
cf9309029c
@ -154,6 +154,7 @@ void tcp_general_timer(void)
|
||||
while (1) {
|
||||
inc_global_variables();
|
||||
check_sockets();
|
||||
vtimer_remove(&tcp_vtimer);
|
||||
vtimer_set_wakeup(&tcp_vtimer, interval, thread_getpid());
|
||||
thread_sleep();
|
||||
}
|
||||
|
@ -118,6 +118,7 @@ static int set_timeout(vtimer_t *timeout, long useconds, void *args)
|
||||
interval.seconds = useconds / 1000000;
|
||||
interval.microseconds = (useconds % 1000000) * 1000;
|
||||
|
||||
vtimer_remove(timeout);
|
||||
return vtimer_set_msg(timeout, interval, sending_slot_pid, args);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user