-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Description
I did this
I use libcurl for CONNECT_ONLY mode to do websocks (using wslay library). The code works well, has lots of unit tests, went through stress testing as well and overall worked quite ok (without using ssl). Today I tried to use this websock impl with a commercial service and I started seeing weird bugs. In short, it looked like the remote server would stop responding to my WS ping frames after replying to me 5 times. When I tried to debug more, it appeared that after around 60 seconds all curl_easy_send calls would fail with 55 (CURLE_SEND_ERROR) while WSAGetLastError() would return WSAEWOULDBLOCK. I tried to handle the case as WSAEWOULDBLOCK but it didn't work.
There was not heavy sending to cause WSAEWOULDBLOCK, it was a 10-byte msg each 10 seconds.
It all looked suspicious, as the error was happening precisely around 60 second mark after making a connection.
I wanted to capture it all with wireshark to see what's on the wire, but schannel has no options to decrypt connection. So, I built it with openssl instead and ... this fixed the issue. Suddenly, the problem was gone, while with schannel it was 100% happening precisely at 60 second mark of the connection.
Is it something that was already observed/known issue with tls+schannel with curl?
I use libcurl 8.12.1
I expected the following
No response
curl/libcurl version
8.12.1
operating system
Windows 11