mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-10 14:17:47 +02:00
Use timeout events for the identify and message timers.
This commit is contained in:
@ -120,8 +120,11 @@ server_client_lost(struct client *c)
|
||||
if (c->title != NULL)
|
||||
xfree(c->title);
|
||||
|
||||
evtimer_del(&c->identify_timer);
|
||||
|
||||
if (c->message_string != NULL)
|
||||
xfree(c->message_string);
|
||||
evtimer_del(&c->message_timer);
|
||||
|
||||
if (c->prompt_string != NULL)
|
||||
xfree(c->prompt_string);
|
||||
@ -448,12 +451,6 @@ server_client_check_timers(struct client *c)
|
||||
if (gettimeofday(&tv, NULL) != 0)
|
||||
fatal("gettimeofday failed");
|
||||
|
||||
if (c->flags & CLIENT_IDENTIFY && timercmp(&tv, &c->identify_timer, >))
|
||||
server_clear_identify(c);
|
||||
|
||||
if (c->message_string != NULL && timercmp(&tv, &c->message_timer, >))
|
||||
status_message_clear(c);
|
||||
|
||||
if (c->message_string != NULL || c->prompt_string != NULL) {
|
||||
/*
|
||||
* Don't need timed redraw for messages/prompts so bail now.
|
||||
|
Reference in New Issue
Block a user