I’m caught by a strange problem.
A listening port that is working normally suddenly stop accepting new connections(qBittorrent webui stop working).
I did a little dig into Qt source and found that the WSAAccept function on the listening socket gives me WSAEINVAL error.
As the image shows, I’m listening on 50000 three days ago and it stop working today.
The MSDN doc tells it maybe invalid level
or calling accept on a socket that is not listening
. But those make no sense since that socket is working just fine in the last three days.
This problem occurs frequently when the socket is listened for two or three days.