1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-03-21 22:28:37 -05:00

After we thaw a frozen socket, we apparently need to restart the

WSAAsyncSelect or else Windows loses read events.

[originally from svn r5521]
This commit is contained in:
Simon Tatham 2005-03-18 19:47:21 +00:00
parent 5eb26fa459
commit 82f82fdb6d

View File

@ -1516,9 +1516,12 @@ static void sk_tcp_set_frozen(Socket sock, int is_frozen)
if (s->frozen == is_frozen) if (s->frozen == is_frozen)
return; return;
s->frozen = is_frozen; s->frozen = is_frozen;
if (!is_frozen && s->frozen_readable) { if (!is_frozen) {
char c; do_select(s->s, 1);
p_recv(s->s, &c, 1, MSG_PEEK); if (s->frozen_readable) {
char c;
p_recv(s->s, &c, 1, MSG_PEEK);
}
} }
s->frozen_readable = 0; s->frozen_readable = 0;
} }