WinRT: Do not assert on socket close
If no read was established before (no IO pending) the function will fail. In this case there is no need to assert though. Change-Id: Iaa18e4124389783fc2b8363a85c60a308903a713 Task-number: QTBUG-53424 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
This commit is contained in:
parent
eba979f695
commit
a1dccd0708
@ -469,7 +469,10 @@ void QNativeSocketEngine::close()
|
||||
hr = socket3->CancelIOAsync(&action);
|
||||
Q_ASSERT_SUCCEEDED(hr);
|
||||
hr = QWinRTFunctions::await(action);
|
||||
Q_ASSERT_SUCCEEDED(hr);
|
||||
// If there is no pending IO (no read established before) the function will fail with
|
||||
// "function was called at an unexpected time" which is fine.
|
||||
if (hr != E_ILLEGAL_METHOD_CALL)
|
||||
Q_ASSERT_SUCCEEDED(hr);
|
||||
}
|
||||
#endif // _MSC_VER >= 1900
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user