update_pending_info_slaves();
}
- if (FD_ISSET(sock, &input_set)) {
+ if (sock && FD_ISSET(sock, &input_set)) {
if (!info_slave_halted) {
addr_len = sizeof(addr);
newsock = accept(sock, (struct sockaddr *) &addr, &addr_len);
}
#endif
#else /* INFO_SLAVE */
- if (FD_ISSET(sock, &input_set))
+ if (sock && FD_ISSET(sock, &input_set))
setup_desc(sock, false);
#ifdef HAS_OPENSSL
if (sslsock && FD_ISSET(sslsock, &input_set))