]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
Fix a subtle bug affecting multiple-socket handling in Plink. (Was
authorSimon Tatham <anakin@pobox.com>
Tue, 23 Jan 2001 10:19:17 +0000 (10:19 +0000)
committerSimon Tatham <anakin@pobox.com>
Tue, 23 Jan 2001 10:19:17 +0000 (10:19 +0000)
commitc171bb0a2c8195f2502cdc39fc684ec6df5d6be4
tree959d2bb5092cecd5f9db5ff7c4d289b2b95c8da2
parentf2b218078fa324a3655f48e700d0f92e0b1a44d6
Fix a subtle bug affecting multiple-socket handling in Plink. (Was
interfering with X forwarding.)
Details of bug: the event object used as the target of
WSAEventSelect is created in such a way that it is automatically
reset when it releases a thread from WaitFor*Objects. Subsequently,
a read on the first socket in the list causes another network event
if not all the available data was read; thus the event object is set
again. Then, WSAEnumNetworkEvents is called again for the _second_
socket, and is passed the network event, which it therefore resets.
So an event has been dropped, and things only get restarted when
some more data arrives on the first socket.

[originally from svn r888]
plink.c