Handle select errno EINTR properly (not doing this breaks at least many profilers)
authorPerttu Ahola <celeron55@gmail.com>
Thu, 8 Mar 2012 08:03:29 +0000 (10:03 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Thu, 8 Mar 2012 08:03:29 +0000 (10:03 +0200)
src/socket.cpp

index 6d48178f963504c24075e270bc945da31ef3a25f..7b70d429564002c3be7c6c53caa332d861639713 100644 (file)
@@ -331,6 +331,9 @@ bool UDPSocket::WaitData(int timeout_ms)
                                <<timeout_ms<<")"<<std::endl;*/
                return false;
        }
+       else if(result < 0 && errno == EINTR){
+               return false;
+       }
        else if(result < 0){
                // Error
 #ifndef DISABLE_ERRNO