1
0
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:
Oleg Hahm 2013-11-22 23:44:50 +01:00
parent 28624aa37b
commit cf9309029c
2 changed files with 2 additions and 0 deletions

View File

@ -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();
}

View File

@ -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);
}