X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/4b70e70e68842c1a9c23cf357312f7256b20310a..755e29c633c56ccd5eb7131bbd3ed3190696af84:/unix/uxnet.c diff --git a/unix/uxnet.c b/unix/uxnet.c index 8ae0c2f6..9d9e03bc 100644 --- a/unix/uxnet.c +++ b/unix/uxnet.c @@ -774,6 +774,12 @@ static int sk_tcp_write(Socket sock, const char *buf, int len) if (s->writable) try_send(s); + /* + * Update the select() status to correctly reflect whether or + * not we should be selecting for write. + */ + uxsel_tell(s); + return bufchain_size(&s->output_data); } @@ -795,6 +801,12 @@ static int sk_tcp_write_oob(Socket sock, const char *buf, int len) if (s->writable) try_send(s); + /* + * Update the select() status to correctly reflect whether or + * not we should be selecting for write. + */ + uxsel_tell(s); + return s->sending_oob; }