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

Side by Side Diff: net/udp/udp_socket_libevent.cc

Issue 100253002: Don't HANDLE_EINTR(close). Either IGNORE_EINTR(close) or just close. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/socket/unix_domain_socket_posix_unittest.cc ('k') | net/udp/udp_socket_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/udp/udp_socket_libevent.h" 5 #include "net/udp/udp_socket_libevent.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <netdb.h> 9 #include <netdb.h>
10 #include <sys/socket.h> 10 #include <sys/socket.h>
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 write_buf_ = NULL; 76 write_buf_ = NULL;
77 write_buf_len_ = 0; 77 write_buf_len_ = 0;
78 write_callback_.Reset(); 78 write_callback_.Reset();
79 send_to_address_.reset(); 79 send_to_address_.reset();
80 80
81 bool ok = read_socket_watcher_.StopWatchingFileDescriptor(); 81 bool ok = read_socket_watcher_.StopWatchingFileDescriptor();
82 DCHECK(ok); 82 DCHECK(ok);
83 ok = write_socket_watcher_.StopWatchingFileDescriptor(); 83 ok = write_socket_watcher_.StopWatchingFileDescriptor();
84 DCHECK(ok); 84 DCHECK(ok);
85 85
86 if (HANDLE_EINTR(close(socket_)) < 0) 86 if (IGNORE_EINTR(close(socket_)) < 0)
87 PLOG(ERROR) << "close"; 87 PLOG(ERROR) << "close";
88 88
89 socket_ = kInvalidSocket; 89 socket_ = kInvalidSocket;
90 addr_family_ = 0; 90 addr_family_ = 0;
91 } 91 }
92 92
93 int UDPSocketLibevent::GetPeerAddress(IPEndPoint* address) const { 93 int UDPSocketLibevent::GetPeerAddress(IPEndPoint* address) const {
94 DCHECK(CalledOnValidThread()); 94 DCHECK(CalledOnValidThread());
95 DCHECK(address); 95 DCHECK(address);
96 if (!is_connected()) 96 if (!is_connected())
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 rv = setsockopt(socket_, IPPROTO_IPV6, IPV6_TCLASS, 666 rv = setsockopt(socket_, IPPROTO_IPV6, IPV6_TCLASS,
667 &dscp_and_ecn, sizeof(dscp_and_ecn)); 667 &dscp_and_ecn, sizeof(dscp_and_ecn));
668 } 668 }
669 if (rv < 0) 669 if (rv < 0)
670 return MapSystemError(errno); 670 return MapSystemError(errno);
671 671
672 return OK; 672 return OK;
673 } 673 }
674 674
675 } // namespace net 675 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/unix_domain_socket_posix_unittest.cc ('k') | net/udp/udp_socket_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698