diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-06-21 14:43:49 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-12-07 13:53:42 +0100 |
commit | 3e405fb188bee0bb8fcf91f574126771c8661afb (patch) | |
tree | 8b97fcbc1f5e9ff2e3f712f03185872bd72e949d /nest/proto.c | |
parent | cc881bd15561224f507ed7162016114ed2b15a1e (diff) |
Nest: Update to new timers
Diffstat (limited to 'nest/proto.c')
-rw-r--r-- | nest/proto.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/nest/proto.c b/nest/proto.c index 8d5edda3..27c8fded 100644 --- a/nest/proto.c +++ b/nest/proto.c @@ -1083,9 +1083,8 @@ graceful_restart_init(void) } graceful_restart_state = GRS_ACTIVE; - gr_wait_timer = tm_new(proto_pool); - gr_wait_timer->hook = graceful_restart_done; - tm_start(gr_wait_timer, config->gr_wait); + gr_wait_timer = tm2_new_init(proto_pool, graceful_restart_done, NULL, 0, 0); + tm2_start(gr_wait_timer, config->gr_wait S); } /** @@ -1182,7 +1181,7 @@ channel_graceful_restart_unlock(struct channel *c) graceful_restart_locks--; if ((graceful_restart_state == GRS_ACTIVE) && !graceful_restart_locks) - tm_start(gr_wait_timer, 0); + tm2_start(gr_wait_timer, 0); } @@ -1329,7 +1328,7 @@ proto_schedule_down(struct proto *p, byte restart, byte code) p->down_sched = restart ? PDS_RESTART : PDS_DISABLE; p->down_code = code; - tm_start_max(proto_shutdown_timer, restart ? 2 : 0); + tm2_start_max(proto_shutdown_timer, restart ? 250 MS : 0); } |