diff -Nuradp libvncserver/sockets.c libvncserver/sockets.c
|
|
rfbProcessNewConnection(rfbScreenInfoPtr rfbScreen) |
402 | 402 | rfbLogPerror("rfbProcessNewConnection: error in select"); |
403 | 403 | return FALSE; |
404 | 404 | } |
405 | | if (FD_ISSET(rfbScreen->listenSock, &listen_fds)) |
| 405 | if (rfbScreen->listenSock >= 0 && FD_ISSET(rfbScreen->listenSock, &listen_fds)) |
406 | 406 | chosen_listen_sock = rfbScreen->listenSock; |
407 | | if (FD_ISSET(rfbScreen->listen6Sock, &listen_fds)) |
| 407 | if (rfbScreen->listen6Sock >= 0 && FD_ISSET(rfbScreen->listen6Sock, &listen_fds)) |
408 | 408 | chosen_listen_sock = rfbScreen->listen6Sock; |
409 | 409 | |
410 | 410 | if ((sock = accept(chosen_listen_sock, |