mirror of
https://github.com/tmux/tmux.git
synced 2025-01-12 03:08:46 +00:00
Sync OpenBSD patchset 517:
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:
parent
dcb85fe4b1
commit
34b4c2e607
@ -1,4 +1,4 @@
|
|||||||
/* $Id: server-window.c,v 1.10 2009-11-08 23:22:24 tcunha Exp $ */
|
/* $Id: server-window.c,v 1.11 2009-11-08 23:35:53 tcunha Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
|
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -70,10 +70,12 @@ server_window_loop(void)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
TAILQ_FOREACH(wp, &w->panes, entry) {
|
TAILQ_FOREACH(wp, &w->panes, entry) {
|
||||||
if (server_window_backoff(wp))
|
if (wp->fd != -1) {
|
||||||
bufferevent_disable(wp->event, EV_READ);
|
if (server_window_backoff(wp))
|
||||||
else
|
bufferevent_disable(wp->event, EV_READ);
|
||||||
bufferevent_enable(wp->event, EV_READ);
|
else
|
||||||
|
bufferevent_enable(wp->event, EV_READ);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (j = 0; j < ARRAY_LENGTH(&sessions); j++) {
|
for (j = 0; j < ARRAY_LENGTH(&sessions); j++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user