mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 01:02: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);
|
||||
if (nsent <= 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.
|
||||
*
|
||||
* (Apparently some WinSocks can return <0 but
|
||||
* leave no error indication - WSAGetLastError() is
|
||||
* called but returns zero - so we check that case
|
||||
* and treat it just like WSAEWOULDBLOCK.)
|
||||
* (Some WinSock send() implementations can return
|
||||
* <0 but leave no sensible error indication -
|
||||
* WSAGetLastError() is called but returns zero or
|
||||
* a small number - so we check that case and treat
|
||||
* it just like WSAEWOULDBLOCK.)
|
||||
*/
|
||||
s->writable = FALSE;
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user