src/network/socket/qnativesocketengine_win.cpp
branchRCL_3
changeset 5 d3bac044e0f0
parent 4 3b1da2848fc7
--- a/src/network/socket/qnativesocketengine_win.cpp	Fri Feb 19 23:40:16 2010 +0200
+++ b/src/network/socket/qnativesocketengine_win.cpp	Fri Mar 12 15:46:37 2010 +0200
@@ -1068,7 +1068,7 @@
             break;
         case WSAEBADF:
         case WSAEINVAL:
-            setError(QAbstractSocket::NetworkError, ReadErrorString);
+            //error string is now set in read(), not here in nativeRead()
             break;
         case WSAECONNRESET:
         case WSAECONNABORTED:
@@ -1199,8 +1199,10 @@
 #if defined (QTCPSOCKETENGINE_DEBUG)
     qDebug("QNativeSocketEnginePrivate::nativeClose()");
 #endif
-    linger l = {1, 0};
-    ::setsockopt(socketDescriptor, SOL_SOCKET, SO_DONTLINGER, (char*)&l, sizeof(l));
+    // We were doing a setsockopt here before with SO_DONTLINGER. (However with kind of wrong
+    // usage of parameters, it wants a BOOL but we used a struct and pretended it to be bool).
+    // We don't think setting this option should be done here, if a user wants it she/he can
+     // do it manually with socketDescriptor()/setSocketDescriptor();
     ::closesocket(socketDescriptor);
 }