Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Unified Diff: net/base/nss_memio.c

Issue 17105003: Gracefully handle an asynchronous write disconnect when an SSL read is pending (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/socket/ssl_client_socket_unittest.cc » ('j') | net/socket/ssl_client_socket_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/nss_memio.c
diff --git a/net/base/nss_memio.c b/net/base/nss_memio.c
index bd0471067f4e57e31b39d09889f0caa1bdeef378..f773e8ff5ffa66b097e3d3d96afea76853a481dd 100644
--- a/net/base/nss_memio.c
+++ b/net/base/nss_memio.c
@@ -230,6 +230,8 @@ static int PR_CALLBACK memio_Recv(PRFileDesc *fd, void *buf, PRInt32 len,
secret->read_requested = len;
if (mb->last_err)
PR_SetError(mb->last_err, 0);
+ else if (secret->writebuf.last_err)
+ PR_SetError(secret->writebuf.last_err, 0);
else
PR_SetError(PR_WOULD_BLOCK_ERROR, 0);
return -1;
« no previous file with comments | « no previous file | net/socket/ssl_client_socket_unittest.cc » ('j') | net/socket/ssl_client_socket_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698