diff options
| author | Maxime Coste <mawww@kakoune.org> | 2019-05-23 12:41:31 +1000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2019-05-23 12:42:38 +1000 |
| commit | a1f0bae53a3f0f138e5d0f485699178cb4222a85 (patch) | |
| tree | aba4479a03de3550510ecbb2a23721d32a485f68 /src/remote.cc | |
| parent | 2bef1f1eb8314de610e0922c91d3df98152a7bb2 (diff) | |
Do not try to send remaining data on a closed socket
Fixes #2906
Diffstat (limited to 'src/remote.cc')
| -rw-r--r-- | src/remote.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/remote.cc b/src/remote.cc index 5490a7b6..be793f0b 100644 --- a/src/remote.cc +++ b/src/remote.cc @@ -439,7 +439,8 @@ RemoteUI::~RemoteUI() // Try to send the remaining data if possible, as it might contain the desired exit status try { - send_data(m_socket_watcher.fd(), m_send_buffer); + if (m_socket_watcher.fd() != -1) + send_data(m_socket_watcher.fd(), m_send_buffer); } catch (disconnected&) { |
