cpprestsdk icon indicating copy to clipboard operation
cpprestsdk copied to clipboard

WinHttpSendRequest failed after Power Saving Mode

Open decoder71 opened this issue 3 years ago • 0 comments

We are using the C++ REST SDK (2.10.18+) very deeply in a multi-threaded Windows-11 client (VS2022/x64/x86). Now a serious problem occurred, that if the PC woke up from Power Saving Mode while the client was running, the http_client can't connect anymore. WinHttpSendRequest() returns error 12002 (ERROR_INTERNET_TIMEOUT). No connection attempt is registered on the server service either. If you start another client instance, everything works fine on the same PC. My guess is that WINHTTP has to be reinitialized in the running application after the PC wakes up from Power Saving Mode.

Has anyone already solved this problem?

decoder71 avatar Sep 30 '22 15:09 decoder71