summaryrefslogtreecommitdiffstats
path: root/control.c
diff options
context:
space:
mode:
authornicm <nicm>2021-08-17 20:17:21 +0000
committernicm <nicm>2021-08-17 20:17:21 +0000
commit5fdea440cede1690db9a242a091df72f16e53d24 (patch)
tree5ced112e908bd728c992f48e12549d00fb18f30c /control.c
parent66aaa9e48423c4699843e4a1dc52f1d27f73fe45 (diff)
Treat a pane that has died the same as no pane when sending data to
control mode clients, GitHub issue 2828.
Diffstat (limited to 'control.c')
-rw-r--r--control.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/control.c b/control.c
index e86429cf..efcbc0ff 100644
--- a/control.c
+++ b/control.c
@@ -665,7 +665,7 @@ control_write_pending(struct client *c, struct control_pane *cp, size_t limit)
uint64_t age, t = get_timer();
wp = control_window_pane(c, cp->pane);
- if (wp == NULL) {
+ if (wp == NULL || wp->fd == -1) {
TAILQ_FOREACH_SAFE(cb, &cp->blocks, entry, cb1) {
TAILQ_REMOVE(&cp->blocks, cb, entry);
control_free_block(cs, cb);
@@ -865,7 +865,7 @@ control_check_subs_pane(struct client *c, struct control_sub *csub)
struct control_sub_pane *csp, find;
wp = window_pane_find_by_id(csub->id);
- if (wp == NULL)
+ if (wp == NULL || wp->fd == -1)
return;
w = wp->window;