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

Unified Diff: net/socket/tcp_socket_win.cc

Issue 332793002: Add a NetLog event for when sockets are closed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « net/base/net_log_event_type_list.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/tcp_socket_win.cc
diff --git a/net/socket/tcp_socket_win.cc b/net/socket/tcp_socket_win.cc
index 4667bd8e423dd5b034969c715569fbf8843085c1..88db36fd41c3da42f24b7eb17da0bab4d6a7ac52 100644
--- a/net/socket/tcp_socket_win.cc
+++ b/net/socket/tcp_socket_win.cc
@@ -641,6 +641,9 @@ void TCPSocketWin::Close() {
DCHECK(CalledOnValidThread());
if (socket_ != INVALID_SOCKET) {
+ // Only log the close event if there's actually a socket to close.
+ net_log_.AddEvent(NetLog::EventType::TYPE_SOCKET_CLOSED);
+
// Note: don't use CancelIo to cancel pending IO because it doesn't work
// when there is a Winsock layered service provider.
« no previous file with comments | « net/base/net_log_event_type_list.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698