mirror of
https://github.com/swaywm/sway.git
synced 2024-11-30 03:41:27 +00:00
Removed explicitly setting file descriptors to -1
This commit is contained in:
parent
50a31a6c88
commit
1b2cd93212
|
@ -194,15 +194,12 @@ int ipc_client_handle_readable(int client_fd, uint32_t mask, void *data) {
|
||||||
|
|
||||||
if (mask & WLC_EVENT_ERROR) {
|
if (mask & WLC_EVENT_ERROR) {
|
||||||
sway_log(L_ERROR, "IPC Client socket error, removing client");
|
sway_log(L_ERROR, "IPC Client socket error, removing client");
|
||||||
client->fd = -1;
|
|
||||||
ipc_client_disconnect(client);
|
ipc_client_disconnect(client);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mask & WLC_EVENT_HANGUP) {
|
if (mask & WLC_EVENT_HANGUP) {
|
||||||
sway_log(L_DEBUG, "Client %d hung up", client->fd);
|
sway_log(L_DEBUG, "Client %d hung up", client->fd);
|
||||||
close(client->fd);
|
|
||||||
client->fd = -1;
|
|
||||||
ipc_client_disconnect(client);
|
ipc_client_disconnect(client);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue