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

Unified Diff: extensions/browser/api/socket/tcp_socket.cc

Issue 1463293004: Reset server_socket_ when listen fails in extensions::TCPSocket. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « chrome/test/data/extensions/api_test/socket/api/background.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/socket/tcp_socket.cc
diff --git a/extensions/browser/api/socket/tcp_socket.cc b/extensions/browser/api/socket/tcp_socket.cc
index 8d5257b45c3007ba9e7c0bb2bde5dc6efb2792f6..79558d4f94c567b09481c87bb52c0a68aa024e6f 100644
--- a/extensions/browser/api/socket/tcp_socket.cc
+++ b/extensions/browser/api/socket/tcp_socket.cc
@@ -196,8 +196,10 @@ int TCPSocket::Listen(const std::string& address,
}
int result = server_socket_->ListenWithAddressAndPort(address, port, backlog);
- if (result)
+ if (result) {
+ server_socket_.reset();
*error_msg = kSocketListenError;
+ }
return result;
}
« no previous file with comments | « chrome/test/data/extensions/api_test/socket/api/background.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698