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

Unified Diff: net/udp/udp_socket_win.cc

Issue 914853002: Add CHECK() in UdpSocketLibevent to debug crbug.com/452121 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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/udp/udp_socket_win.h ('k') | remoting/protocol/chromium_socket_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/udp/udp_socket_win.cc
diff --git a/net/udp/udp_socket_win.cc b/net/udp/udp_socket_win.cc
index 928de4ac6b6eddf2f854bd6897766a171926a3f4..465c203a9b4f527647ffd4239d7e3690a22ed25a 100644
--- a/net/udp/udp_socket_win.cc
+++ b/net/udp/udp_socket_win.cc
@@ -296,11 +296,11 @@ int UDPSocketWin::Open(AddressFamily address_family) {
return OK;
}
-void UDPSocketWin::Close() {
+int UDPSocketWin::Close() {
DCHECK(CalledOnValidThread());
if (socket_ == INVALID_SOCKET)
- return;
+ return OK;
if (qos_handle_) {
QwaveAPI::Get().CloseHandle(qos_handle_);
@@ -312,7 +312,7 @@ void UDPSocketWin::Close() {
write_callback_.Reset();
base::TimeTicks start_time = base::TimeTicks::Now();
- closesocket(socket_);
+ int result = MapSystemError(closesocket(socket_));
UMA_HISTOGRAM_TIMES("Net.UDPSocketWinClose",
base::TimeTicks::Now() - start_time);
socket_ = INVALID_SOCKET;
@@ -326,6 +326,8 @@ void UDPSocketWin::Close() {
core_->Detach();
core_ = NULL;
}
+
+ return result;
}
int UDPSocketWin::GetPeerAddress(IPEndPoint* address) const {
« no previous file with comments | « net/udp/udp_socket_win.h ('k') | remoting/protocol/chromium_socket_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698