summaryrefslogtreecommitdiffstats
path: root/src/network/socket/qnativesocketengine_win.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/socket/qnativesocketengine_win.cpp')
-rw-r--r--src/network/socket/qnativesocketengine_win.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/network/socket/qnativesocketengine_win.cpp b/src/network/socket/qnativesocketengine_win.cpp
index 7088a57..8177b4f 100644
--- a/src/network/socket/qnativesocketengine_win.cpp
+++ b/src/network/socket/qnativesocketengine_win.cpp
@@ -1068,7 +1068,7 @@ qint64 QNativeSocketEnginePrivate::nativeRead(char *data, qint64 maxLength)
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 @@ void QNativeSocketEnginePrivate::nativeClose()
#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);
}