diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2015-03-09 21:53:33 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2015-08-10 03:41:46 +0000 |
commit | dc3dd4f634f31ce695033580394758f93911120d (patch) | |
tree | bfeba75188336fc5128a7fb9656cf2be51e2f2aa /src/network/socket/qnativesocketengine_win.cpp | |
parent | 3bf4c222e5f8f3a4044befb8d784afea598946cc (diff) |
Set the socketType and socketProtocol early
The type is known (usually) right after createNewSocket, so let's just
set it. They may get overwritten later (in fetchConnectionParameters),
but this allows early use of setOption when we need to know the socket
type.
Change-Id: Iee8cbc07c4434ce9b560ffff13ca09fccb8e1662
Reviewed-by: Richard J. Moore <rich@kde.org>
Diffstat (limited to 'src/network/socket/qnativesocketengine_win.cpp')
-rw-r--r-- | src/network/socket/qnativesocketengine_win.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/network/socket/qnativesocketengine_win.cpp b/src/network/socket/qnativesocketengine_win.cpp index 72f85c831f..7856db0487 100644 --- a/src/network/socket/qnativesocketengine_win.cpp +++ b/src/network/socket/qnativesocketengine_win.cpp @@ -442,6 +442,10 @@ bool QNativeSocketEnginePrivate::createNewSocket(QAbstractSocket::SocketType soc #endif socketDescriptor = socket; + if (socket != INVALID_SOCKET) { + this->socketProtocol = socketProtocol; + this->socketType = socketType; + } // Make the socket nonblocking. if (!setOption(QAbstractSocketEngine::NonBlockingSocketOption, 1)) { |