Message ID | 1287747270.12843.4388.camel@qabil.uk.xensource.com |
---|---|
State | New |
Headers | show |
diff --git a/ui/vnc.c b/ui/vnc.c index 864342e..65dc55c 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -2736,5 +2736,9 @@ int vnc_display_open(DisplayState *ds, const char *display) vs->display = dpy; } } + /* necessary to prevent accept() hanging indefinitely if a clients + * connection-reset wins the race between poll() and accept() + */ + socket_set_nonblock(vs->lsock); return qemu_set_fd_handler2(vs->lsock, NULL, vnc_listen_read, NULL, vs); }