IPv6 support for LibVNCServer, part onepointsix: fix a small logic error.

Without this, we would have gotten a stale IPv4 socket in a race
condition.
pull/1/head
Christian Beier 11 years ago
parent 23413bf120
commit 0e74b5db9a

@ -593,7 +593,7 @@ listenerRun(void *data)
len = sizeof (peer);
if (FD_ISSET(screen->listenSock, &listen_fds))
client_fd = accept(screen->listenSock, (struct sockaddr*)&peer, &len);
if (FD_ISSET(screen->listen6Sock, &listen_fds))
else if (FD_ISSET(screen->listen6Sock, &listen_fds))
client_fd = accept(screen->listen6Sock, (struct sockaddr*)&peer, &len);
if(client_fd >= 0)

Loading…
Cancel
Save