]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/sockunix.cpp
Go back to using a fixed value of 3 for lines/columns per action for mouse wheel...
[wxWidgets.git] / src / unix / sockunix.cpp
index 51a158cab657bc0b18d0de9ab154d928fcb98c1f..7d47f18e9534696095803f56a8b2a006ed13867f 100644 (file)
@@ -4,7 +4,6 @@
 // Authors:     Guilhem Lavaux, Guillermo Rodriguez Garcia, David Elliott,
 //              Vadim Zeitlin
 // Created:     April 1997
-// RCS-ID:      $Id$
 // Copyright:   (c) 1997 Guilhem Lavaux
 //              (c) 2008 Vadim Zeitlin
 // Licence:     wxWindows licence
 // wxSocketImpl implementation
 // ============================================================================
 
-/* static */
-wxSocketImpl *wxSocketImpl::Create(wxSocketBase& wxsocket)
-{
-    return new wxSocketImplUnix(wxsocket);
-}
-
-
 wxSocketError wxSocketImplUnix::GetLastError() const
 {
     switch ( errno )
@@ -237,7 +229,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 */