mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-02-03 21:52:24 +00:00
Fix the intermittent fault in the socket layer that was occasionally
bombing out X forwarding. It turns out to be a workaround for YET ANOTHER useless WinSock implementation. Arrgh! [originally from svn r1232]
This commit is contained in:
parent
c6346dce42
commit
25c58b71d1
11
winnet.c
11
winnet.c
@ -718,14 +718,15 @@ void try_send(Actual_Socket s)
|
|||||||
noise_ultralight(nsent);
|
noise_ultralight(nsent);
|
||||||
if (nsent <= 0) {
|
if (nsent <= 0) {
|
||||||
err = (nsent < 0 ? WSAGetLastError() : 0);
|
err = (nsent < 0 ? WSAGetLastError() : 0);
|
||||||
if ((err == 0 && nsent < 0) || err == WSAEWOULDBLOCK) {
|
if ((err < WSABASEERR && nsent < 0) || err == WSAEWOULDBLOCK) {
|
||||||
/*
|
/*
|
||||||
* Perfectly normal: we've sent all we can for the moment.
|
* Perfectly normal: we've sent all we can for the moment.
|
||||||
*
|
*
|
||||||
* (Apparently some WinSocks can return <0 but
|
* (Some WinSock send() implementations can return
|
||||||
* leave no error indication - WSAGetLastError() is
|
* <0 but leave no sensible error indication -
|
||||||
* called but returns zero - so we check that case
|
* WSAGetLastError() is called but returns zero or
|
||||||
* and treat it just like WSAEWOULDBLOCK.)
|
* a small number - so we check that case and treat
|
||||||
|
* it just like WSAEWOULDBLOCK.)
|
||||||
*/
|
*/
|
||||||
s->writable = FALSE;
|
s->writable = FALSE;
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user