X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4f260c9c68b42e6ccc82710efe6ca6e8418e721d..400930d3445bd8d8745c621b9ad0b352433db622:/src/unix/sockunix.cpp diff --git a/src/unix/sockunix.cpp b/src/unix/sockunix.cpp index b2e298d83f..0bcaa363b9 100644 --- a/src/unix/sockunix.cpp +++ b/src/unix/sockunix.cpp @@ -230,7 +230,15 @@ void wxSocketImplUnix::OnWriteWaiting() void wxSocketImplUnix::OnExceptionWaiting() { - wxFAIL_MSG( "not supposed to be called" ); + // when using epoll() this is called when an error occurred on the socket + // so close it if it hadn't been done yet -- what else can we do? + // + // notice that we shouldn't be called at all when using select() as we + // don't use wxFDIO_EXCEPTION when registering the socket for monitoring + // and this is good because select() would call this for any OOB data which + // is not necessarily an error + if ( m_fd != INVALID_SOCKET ) + OnStateChange(wxSOCKET_LOST); } #endif /* wxUSE_SOCKETS */