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

Unified Diff: net/socket/ssl_client_socket_nss.cc

Issue 337823002: Stop attempting to write to transport sockets in NSS on failure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rsleevi comments Created 6 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
Index: net/socket/ssl_client_socket_nss.cc
diff --git a/net/socket/ssl_client_socket_nss.cc b/net/socket/ssl_client_socket_nss.cc
index 3a8b39e678c2785ea4d6fd7c60fea762fb599883..4a67f4d58b2a5d81d3cfb6ad62ca3d2f07c27b58 100644
--- a/net/socket/ssl_client_socket_nss.cc
+++ b/net/socket/ssl_client_socket_nss.cc
@@ -2140,6 +2140,13 @@ int SSLClientSocketNSS::Core::BufferSend() {
if (transport_send_busy_)
return ERR_IO_PENDING;
+ // If there was an error, return it synchronously rather than call
wtc 2014/06/17 18:24:06 Nit: "return it" is no longer accurate because you
davidben 2014/06/17 20:27:43 Done.
+ // DoBufferSend on the network task runner. This is important to prevent
+ // spinning infinitely in the off-thread NSS case. The error code itself is
+ // ignored, so just return ERR_ABORTED. See https://crbug.com/381160.
+ if (memio_LastWriteError(nss_bufs_) != 0)
+ return ERR_ABORTED;
+
const char* buf1;
const char* buf2;
unsigned int len1, len2;

Powered by Google App Engine
This is Rietveld 408576698