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

Unified Diff: net/socket/ssl_client_socket_nss.cc

Issue 7399025: Fix instability in SSL client/server sockets (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 5 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_server_socket_nss.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e827f398db65eb56a946e5c1ed286f455ccccb12..c1b79a466dfbbd2dcb2191353be39753bce786a2 100644
--- a/net/socket/ssl_client_socket_nss.cc
+++ b/net/socket/ssl_client_socket_nss.cc
@@ -1296,6 +1296,10 @@ int SSLClientSocketNSS::DoReadLoop(int result) {
network_moved = DoTransportIO();
} while (rv == ERR_IO_PENDING && network_moved);
+ do {
+ network_moved = DoTransportIO();
+ } while (network_moved);
+
LeaveFunction("");
return rv;
}
@@ -1323,6 +1327,10 @@ int SSLClientSocketNSS::DoWriteLoop(int result) {
network_moved = DoTransportIO();
} while (rv == ERR_IO_PENDING && network_moved);
+ do {
+ network_moved = DoTransportIO();
+ } while (network_moved);
+
LeaveFunction("");
return rv;
}
@@ -1742,7 +1750,7 @@ bool SSLClientSocketNSS::DoTransportIO() {
if (nss_bufs_ != NULL) {
int nsent = BufferSend();
int nreceived = BufferRecv();
- network_moved = (nsent > 0 || nreceived >= 0);
+ network_moved = (nsent > 0 || nreceived > 0);
Sergey Ulanov 2011/07/18 17:58:36 I'm not sure why why we were returning true for nr
}
LeaveFunction(network_moved);
return network_moved;
« no previous file with comments | « no previous file | net/socket/ssl_server_socket_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698