File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -229,15 +229,20 @@ rfbHttpCheckFds(rfbScreenInfoPtr rfbScreen)
229229 || (rfbScreen -> httpListen6Sock != RFB_INVALID_SOCKET && FD_ISSET (rfbScreen -> httpListen6Sock , & fds ))) {
230230 if (rfbScreen -> httpSock != RFB_INVALID_SOCKET ) rfbCloseSocket (rfbScreen -> httpSock );
231231
232+ /*
233+ * Mirror the RFB listener in listenerRun(): on a failed accept() just bail and
234+ * keep the listening socket. While the bound interface's address is gone the
235+ * accept() fails (e.g. EINVAL), but the socket is not dead -- it resumes once
236+ * the address returns. Logging every failure here would flood the log for the
237+ * whole down period, so stay silent like the RFB path does.
238+ */
232239 if (FD_ISSET (rfbScreen -> httpListenSock , & fds )) {
233240 if ((rfbScreen -> httpSock = accept (rfbScreen -> httpListenSock , (struct sockaddr * )& addr , & addrlen )) == RFB_INVALID_SOCKET ) {
234- rfbLogPerror ("httpCheckFds: accept" );
235241 return ;
236242 }
237243 }
238244 else if (FD_ISSET (rfbScreen -> httpListen6Sock , & fds )) {
239245 if ((rfbScreen -> httpSock = accept (rfbScreen -> httpListen6Sock , (struct sockaddr * )& addr , & addrlen )) == RFB_INVALID_SOCKET ) {
240- rfbLogPerror ("httpCheckFds: accept" );
241246 return ;
242247 }
243248 }
You can’t perform that action at this time.
0 commit comments