summaryrefslogtreecommitdiff
path: root/usr.bin/tmux
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2021-06-10 07:51:44 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2021-06-10 07:51:44 +0000
commit6a6a5c2cb8eb414a6b8b56755a6078cfc4d6f787 (patch)
tree8eb7de482458ef7d5ecb49c0b6a94fa3844c69f9 /usr.bin/tmux
parente57c1cfc9cc858401ca95380862658ad9602fa0a (diff)
Fire check callback after cleaning up event so it does not get stuck,
from Jeongho Jang in GitHub issue 2695.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r--usr.bin/tmux/file.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/tmux/file.c b/usr.bin/tmux/file.c
index 7a3d86e8816..55a67c211b4 100644
--- a/usr.bin/tmux/file.c
+++ b/usr.bin/tmux/file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.c,v 1.10 2021/02/12 06:52:48 nicm Exp $ */
+/* $OpenBSD: file.c,v 1.11 2021/06/10 07:51:43 nicm Exp $ */
/*
* Copyright (c) 2019 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -506,14 +506,14 @@ file_write_error_callback(__unused struct bufferevent *bev, __unused short what,
log_debug("write error file %d", cf->stream);
- if (cf->cb != NULL)
- cf->cb(NULL, NULL, 0, -1, NULL, cf->data);
-
bufferevent_free(cf->event);
cf->event = NULL;
close(cf->fd);
cf->fd = -1;
+
+ if (cf->cb != NULL)
+ cf->cb(NULL, NULL, 0, -1, NULL, cf->data);
}
/* Client file write callback. */