summaryrefslogtreecommitdiffstats
path: root/net/udp/udp_socket_win.cc
diff options
context:
space:
mode:
authorjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-13 11:15:32 +0000
committerjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-13 11:15:32 +0000
commit338e798c961ac7889552267d8a7397029449de15 (patch)
tree323858e3e9934718077f8d7f87483bc3118ba6a3 /net/udp/udp_socket_win.cc
parenta5017a6bf3e7a186e0b3b18ee84724de2db010e3 (diff)
downloadchromium_src-338e798c961ac7889552267d8a7397029449de15.zip
chromium_src-338e798c961ac7889552267d8a7397029449de15.tar.gz
chromium_src-338e798c961ac7889552267d8a7397029449de15.tar.bz2
Handle error in a socket->connect() attempt inside quic_stream_factory
R=rch BUG=327057 Review URL: https://codereview.chromium.org/105083006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240586 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/udp/udp_socket_win.cc')
-rw-r--r--net/udp/udp_socket_win.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/udp/udp_socket_win.cc b/net/udp/udp_socket_win.cc
index 5ab63a5..7b7a528 100644
--- a/net/udp/udp_socket_win.cc
+++ b/net/udp/udp_socket_win.cc
@@ -10,6 +10,7 @@
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
#include "base/metrics/histogram.h"
+#include "base/metrics/sparse_histogram.h"
#include "base/metrics/stats_counters.h"
#include "base/rand_util.h"
#include "net/base/io_buffer.h"
@@ -338,6 +339,7 @@ int UDPSocketWin::InternalConnect(const IPEndPoint& address) {
// else connect() does the DatagramSocket::DEFAULT_BIND
if (rv < 0) {
+ UMA_HISTOGRAM_SPARSE_SLOWLY("Net.UdpSocketRandomBindErrorCode", rv);
Close();
return rv;
}
@@ -663,6 +665,8 @@ int UDPSocketWin::DoBind(const IPEndPoint& address) {
if (!address.ToSockAddr(storage.addr, &storage.addr_len))
return ERR_ADDRESS_INVALID;
int rv = bind(socket_, storage.addr, storage.addr_len);
+ if (rv < 0)
+ UMA_HISTOGRAM_SPARSE_SLOWLY("Net.UdpSocketBindErrorFromWinOS", rv);
return rv < 0 ? MapSystemError(WSAGetLastError()) : rv;
}