aboutsummaryrefslogtreecommitdiffstats
path: root/LibOVR/Src/Net/OVR_Unix_Socket.cpp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-03-28 01:43:35 +0100
committerSven Gothel <[email protected]>2015-03-28 01:43:35 +0100
commit4207f9c279e832e3afcb3f5fc6cd8d84cb4cfe4c (patch)
treecf3671058d55b47ab6cb6f36f369928606137628 /LibOVR/Src/Net/OVR_Unix_Socket.cpp
parentc29cd1a2fbff6282bab956ad61661ac9d48c4e6e (diff)
Bump OculusVR RIFT SDK to 0.5.0.1vanilla_0.5.0.1
Diffstat (limited to 'LibOVR/Src/Net/OVR_Unix_Socket.cpp')
-rw-r--r--LibOVR/Src/Net/OVR_Unix_Socket.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/LibOVR/Src/Net/OVR_Unix_Socket.cpp b/LibOVR/Src/Net/OVR_Unix_Socket.cpp
index 6f2a678..7477ee7 100644
--- a/LibOVR/Src/Net/OVR_Unix_Socket.cpp
+++ b/LibOVR/Src/Net/OVR_Unix_Socket.cpp
@@ -25,10 +25,10 @@ limitations under the License.
************************************************************************************/
#include "OVR_Unix_Socket.h"
-#include "../Kernel/OVR_Std.h"
-#include "../Kernel/OVR_Allocator.h"
-#include "../Kernel/OVR_Threads.h" // Thread::MSleep
-#include "../Kernel/OVR_Log.h"
+#include "Kernel/OVR_Std.h"
+#include "Kernel/OVR_Allocator.h"
+#include "Kernel/OVR_Threads.h" // Thread::MSleep
+#include "Kernel/OVR_Log.h"
#include <errno.h>
@@ -409,10 +409,14 @@ TCPSocket::TCPSocket(SocketHandle boundHandle, bool isListenSocket)
TheSocket = boundHandle;
IsListenSocket = isListenSocket;
IsConnecting = false;
- SetSocketOptions(TheSocket);
- // The actual socket is always non-blocking
- _Ioctlsocket(TheSocket, 1);
+ if (TheSocket != INVALID_SOCKET)
+ {
+ SetSocketOptions(TheSocket);
+
+ // The actual socket is always non-blocking
+ _Ioctlsocket(TheSocket, 1);
+ }
}
TCPSocket::~TCPSocket()