mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-02-04 22:22:25 +00:00
David Brinegar's workaround for an error reporting problem in some
WinSocks. [originally from svn r1004]
This commit is contained in:
parent
080d59422b
commit
dfb9893509
11
winnet.c
11
winnet.c
@ -504,8 +504,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 == WSAEWOULDBLOCK) {
|
if ((err==0 && 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
|
||||||
|
* leave no error indication - WSAGetLastError() is
|
||||||
|
* called but returns zero - so we check that case
|
||||||
|
* and treat it just like WSAEWOULDBLOCK.)
|
||||||
|
*/
|
||||||
s->writable = FALSE;
|
s->writable = FALSE;
|
||||||
return;
|
return;
|
||||||
} else if (nsent == 0 ||
|
} else if (nsent == 0 ||
|
||||||
|
Loading…
Reference in New Issue
Block a user