GUAC-1361: listen() need not be present in main loop
See GUAC-1361. Signed-off-by: Isaac Boukris <iboukris@gmail.com>
This commit is contained in:
parent
602285be35
commit
61b01299b2
@ -607,17 +607,17 @@ int main(int argc, char* argv[]) {
|
||||
/* Free addresses */
|
||||
freeaddrinfo(addresses);
|
||||
|
||||
/* Daemon loop */
|
||||
for (;;) {
|
||||
|
||||
pid_t child_pid;
|
||||
|
||||
/* Listen for connections */
|
||||
if (listen(socket_fd, 5) < 0) {
|
||||
guacd_log(GUAC_LOG_ERROR, "Could not listen on socket: %s", strerror(errno));
|
||||
return 3;
|
||||
}
|
||||
|
||||
/* Daemon loop */
|
||||
for (;;) {
|
||||
|
||||
pid_t child_pid;
|
||||
|
||||
/* Accept connection */
|
||||
client_addr_len = sizeof(client_addr);
|
||||
connected_socket_fd = accept(socket_fd,
|
||||
|
Loading…
Reference in New Issue
Block a user