X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4f260c9c68b42e6ccc82710efe6ca6e8418e721d..e331a94e90f76e19823df13772f87541fc6ead20:/src/common/socket.cpp diff --git a/src/common/socket.cpp b/src/common/socket.cpp index 0bb79b219f..7e1aafd4a2 100644 --- a/src/common/socket.cpp +++ b/src/common/socket.cpp @@ -1355,8 +1355,10 @@ wxSocketBase::DoWait(long timeout, wxSocketEventFlags flags) { wxCHECK_MSG( m_impl, -1, "can't wait on invalid socket" ); - // we're never going to become ready if we're not connected (any more) - if ( !m_connected && !m_establishing ) + // we're never going to become ready in a client if we're not connected any + // more (OTOH a server can call this to precisely wait for a connection so + // do wait for it in this case) + if ( !m_impl->IsServer() && !m_connected && !m_establishing ) return -1; // This can be set to true from Interrupt() to exit this function a.s.a.p. @@ -2079,4 +2081,9 @@ wxFORCE_LINK_MODULE( socketiohandler ) wxFORCE_LINK_MODULE( mswsocket ) #endif +// and for OSXManagerSetter in the OS X one +#ifdef __WXMAC__ + wxFORCE_LINK_MODULE( osxsocket ) +#endif + #endif // wxUSE_SOCKETS