diff options
author | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-13 11:15:32 +0000 |
---|---|---|
committer | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-13 11:15:32 +0000 |
commit | 338e798c961ac7889552267d8a7397029449de15 (patch) | |
tree | 323858e3e9934718077f8d7f87483bc3118ba6a3 /net/udp/udp_socket_libevent.cc | |
parent | a5017a6bf3e7a186e0b3b18ee84724de2db010e3 (diff) | |
download | chromium_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_libevent.cc')
-rw-r--r-- | net/udp/udp_socket_libevent.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/udp/udp_socket_libevent.cc b/net/udp/udp_socket_libevent.cc index dc40831..457ce88 100644 --- a/net/udp/udp_socket_libevent.cc +++ b/net/udp/udp_socket_libevent.cc @@ -15,6 +15,7 @@ #include "base/callback.h" #include "base/logging.h" #include "base/message_loop/message_loop.h" +#include "base/metrics/sparse_histogram.h" #include "base/metrics/stats_counters.h" #include "base/posix/eintr_wrapper.h" #include "base/rand_util.h" @@ -270,6 +271,7 @@ int UDPSocketLibevent::InternalConnect(const IPEndPoint& address) { // else connect() does the DatagramSocket::DEFAULT_BIND if (rv < 0) { + UMA_HISTOGRAM_SPARSE_SLOWLY("Net.UdpSocketRandomBindErrorCode", rv); Close(); return rv; } @@ -606,6 +608,8 @@ int UDPSocketLibevent::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.UdpSocketBindErrorFromPosix", rv); return rv < 0 ? MapSystemError(errno) : rv; } |