summaryrefslogtreecommitdiff
path: root/src/file.cc
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2019-05-23 12:41:31 +1000
committerMaxime Coste <mawww@kakoune.org>2019-05-23 12:42:38 +1000
commita1f0bae53a3f0f138e5d0f485699178cb4222a85 (patch)
treeaba4479a03de3550510ecbb2a23721d32a485f68 /src/file.cc
parent2bef1f1eb8314de610e0922c91d3df98152a7bb2 (diff)
Do not try to send remaining data on a closed socket
Fixes #2906
Diffstat (limited to 'src/file.cc')
-rw-r--r--src/file.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/file.cc b/src/file.cc
index 64373095..9c5f23ab 100644
--- a/src/file.cc
+++ b/src/file.cc
@@ -148,6 +148,7 @@ StringView homedir()
bool fd_readable(int fd)
{
+ kak_assert(fd >= 0);
fd_set rfds;
FD_ZERO(&rfds);
FD_SET(fd, &rfds);
@@ -158,6 +159,7 @@ bool fd_readable(int fd)
bool fd_writable(int fd)
{
+ kak_assert(fd >= 0);
fd_set wfds;
FD_ZERO(&wfds);
FD_SET(fd, &wfds);