Don't try enable/disable the event if the window pane is dead (fd == -1), as

the event will have been freed.
This commit is contained in:
Nicholas Marriott 2009-11-06 10:42:06 +00:00
parent bed8153ba0
commit f98d13e7dc

View File

@ -70,11 +70,13 @@ server_window_loop(void)
continue;
TAILQ_FOREACH(wp, &w->panes, entry) {
if (wp->fd != -1) {
if (server_window_backoff(wp))
bufferevent_disable(wp->event, EV_READ);
else
bufferevent_enable(wp->event, EV_READ);
}
}
for (j = 0; j < ARRAY_LENGTH(&sessions); j++) {
s = ARRAY_ITEM(&sessions, j);