diff options
author | nelsonb%netscape.com <devnull@localhost> | 2001-05-18 20:41:01 +0000 |
---|---|---|
committer | nelsonb%netscape.com <devnull@localhost> | 2001-05-18 20:41:01 +0000 |
commit | 011867fa9dee4beba2b2d9268749a4d9c8b199ea (patch) | |
tree | e8b328d13a3036b64d3b22f0efc0bbfda9ca5345 | |
parent | 39422b62c5d02632e1bd7c5953b5f92da9e23605 (diff) | |
download | nss-hg-011867fa9dee4beba2b2d9268749a4d9c8b199ea.tar.gz |
Add a workaround in the NSS_3_2_BRANCH for bug 80092. When write data
has been buffered due to WOULDBLOCK, and the application wants to poll
on read, poll on write, too. This will drive the write data to
completion.
-rw-r--r-- | security/nss/lib/ssl/sslsock.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/security/nss/lib/ssl/sslsock.c b/security/nss/lib/ssl/sslsock.c index 431345db3..626976439 100644 --- a/security/nss/lib/ssl/sslsock.c +++ b/security/nss/lib/ssl/sslsock.c @@ -1306,8 +1306,12 @@ ssl_Poll(PRFileDesc *fd, PRInt16 how_flags, PRInt16 *out_flags) if ((ret_flags & PR_POLL_READ) && (SSL_DataPending(fd) > 0)) { *out_flags = PR_POLL_READ; /* it's ready already. */ - - } else if (ret_flags && (fd->lower->methods->poll != NULL)) { + return ret_flags; + } + if ((ret_flags & PR_POLL_READ) && (ss->pendingBuf.len != 0)) { + ret_flags |= PR_POLL_WRITE; + } + if (ret_flags && (fd->lower->methods->poll != NULL)) { ret_flags = fd->lower->methods->poll(fd->lower, ret_flags, out_flags); } |