https://bugs.winehq.org/show_bug.cgi?id=28756
--- Comment #4 from Bruno Jesus 00cpxxx@gmail.com --- Created attachment 48730 --> https://bugs.winehq.org/attachment.cgi?id=48730 patch
I think the function is doing cleanup before the thread is able to test the socket, this patch may help. Please, test it.