diff options
author | Kenny Levinsen <kl@kl.wtf> | 2020-11-23 01:03:37 +0100 |
---|---|---|
committer | Kenny Levinsen <kl@kl.wtf> | 2020-11-23 17:56:55 +0100 |
commit | e0782a825e769c67dab8222911414765c0839d24 (patch) | |
tree | 8a4a089d0b2c95630eb8cc71a16ccfac63dd4669 /seatd/server.c | |
parent | df8494af61356be3b2c575bd3f6a33090a286248 (diff) |
client: More robust handling of client links
Diffstat (limited to 'seatd/server.c')
-rw-r--r-- | seatd/server.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/seatd/server.c b/seatd/server.c index acb366e..3ca73b3 100644 --- a/seatd/server.c +++ b/seatd/server.c @@ -132,13 +132,12 @@ int server_add_client(struct server *server, int fd) { client->event_source = poller_add_fd(&server->poller, fd, EVENT_READABLE, client_handle_connection, client); if (client->event_source == NULL) { - client_destroy(client); log_errorf("could not add client socket to poller: %s", strerror(errno)); + client_destroy(client); return -1; } log_infof("new client connected (pid: %d, uid: %d, gid: %d)", client->pid, client->uid, client->gid); - linked_list_insert(&server->idle_clients, &client->link); return 0; } |