- // Set as non-blocking, so the acceptor thread can notice that we want to shut it down.
- if (ioctl(server_sock, FIONBIO, &one) == -1) {
- log_perror("ioctl(FIONBIO)");
- exit(1);
- }
-
- if (bind(server_sock, reinterpret_cast<const sockaddr *>(&addr), sizeof(addr)) == -1) {