https://bugs.winehq.org/show_bug.cgi?id=52335
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW
--- Comment #5 from Zebediah Figura z.figura12@gmail.com --- I can reproduce the problem and I think I see why it happens.
The basic problem is that the game does a mDNS query to the Bonjour process and hangs when it doesn't respond. Not great design there (you should really put a reasonable timeout on these things), but anyway, the Bonjour socket hangs because it essentially does this:
event1 = CreateEvent(...); WSAEventSelect(listener, event1, FD_ACCEPT); when event1 is signaled: s = accept(listener, ...); event2 = CreateEvent(...); WSAEventSelect(s, event2, FD_READ); when event2 is signaled: read data etc.
The effect of b1a2238a1 is that when data is already available in the pipe for the newly accepted socket (which seems to be always true for this program) the socket will have its pending_events and reported_events include AFD_POLL_READ. WSAEventSelect() will try to reselect the socket, but the problem is that it already has reported pending events via event1 and therefore won't actually select for POLLIN.
It turns out that we're always supposed to signal the event in WSAEventSelect() if there are pending events to be read (that match the mask), so technically this is a case of a fix exposing another bug. I've sent a patch.