Details
-
Suggestion
-
Resolution: Out of scope
-
Not Evaluated
-
4.0.1
-
None
Description
QSocketNotifier uses single message number (WM_USER) for all socket notification messages under Windows. If an application has lots of sockets with short life times, it is possible that a socket number gets recycled while the Windows event queue still has messages for the old socket.
This scenario could be fixed by using the full user assignable range for socket messages, by incrementing the message number every time a new socket is registered via WSAAsyncSelect and by comparing incoming messages against the last registered WSAAsyncSelect message number. This may leave an application thinking that a disconnected socket is connected which causes serious problems.