diff options
author | Scott Anderson <ascent12@hotmail.com> | 2017-04-08 00:45:31 +1200 |
---|---|---|
committer | Scott Anderson <ascent12@hotmail.com> | 2017-04-08 00:45:31 +1200 |
commit | 1b2cd93212508913451fe6b9549f4b172925a4f6 (patch) | |
tree | 695a25ad9476d041ddeab6f45b67160eef6c7f72 | |
parent | Fix dangling file descriptors (fixes #1152) (diff) | |
download | sway-1b2cd93212508913451fe6b9549f4b172925a4f6.tar.gz sway-1b2cd93212508913451fe6b9549f4b172925a4f6.tar.zst sway-1b2cd93212508913451fe6b9549f4b172925a4f6.zip |
Removed explicitly setting file descriptors to -1
-rw-r--r-- | sway/ipc-server.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/sway/ipc-server.c b/sway/ipc-server.c index 3600cab2..984e6754 100644 --- a/sway/ipc-server.c +++ b/sway/ipc-server.c | |||
@@ -194,15 +194,12 @@ int ipc_client_handle_readable(int client_fd, uint32_t mask, void *data) { | |||
194 | 194 | ||
195 | if (mask & WLC_EVENT_ERROR) { | 195 | if (mask & WLC_EVENT_ERROR) { |
196 | sway_log(L_ERROR, "IPC Client socket error, removing client"); | 196 | sway_log(L_ERROR, "IPC Client socket error, removing client"); |
197 | client->fd = -1; | ||
198 | ipc_client_disconnect(client); | 197 | ipc_client_disconnect(client); |
199 | return 0; | 198 | return 0; |
200 | } | 199 | } |
201 | 200 | ||
202 | if (mask & WLC_EVENT_HANGUP) { | 201 | if (mask & WLC_EVENT_HANGUP) { |
203 | sway_log(L_DEBUG, "Client %d hung up", client->fd); | 202 | sway_log(L_DEBUG, "Client %d hung up", client->fd); |
204 | close(client->fd); | ||
205 | client->fd = -1; | ||
206 | ipc_client_disconnect(client); | 203 | ipc_client_disconnect(client); |
207 | return 0; | 204 | return 0; |
208 | } | 205 | } |