Tolerate unwritable socket when trying to send the disconnection message
Fixes #1552
This commit is contained in:
parent
8e3e5b10c1
commit
bd66aff808
|
@ -419,7 +419,13 @@ RemoteUI::RemoteUI(int socket, DisplayCoord dimensions)
|
|||
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);
|
||||
}
|
||||
catch (disconnected&)
|
||||
{
|
||||
}
|
||||
|
||||
write_to_debug_buffer(format("remote client disconnected: {}", m_socket_watcher.fd()));
|
||||
m_socket_watcher.close_fd();
|
||||
|
|
Loading…
Reference in New Issue
Block a user