Chromium Code Reviews| Index: net/socket/socket_libevent.cc |
| diff --git a/net/socket/socket_libevent.cc b/net/socket/socket_libevent.cc |
| index 84bd3a7ea6f048787151d79c91a8ef569ef853c0..8314a0fa289b3c1286e3c484e8fa9878dadaba85 100644 |
| --- a/net/socket/socket_libevent.cc |
| +++ b/net/socket/socket_libevent.cc |
| @@ -106,6 +106,13 @@ int SocketLibevent::AdoptConnectedSocket(SocketDescriptor socket, |
| return OK; |
| } |
| +SocketDescriptor SocketLibevent::ReleaseConnectedSocket() { |
| + SocketDescriptor tmp_fd = socket_fd_; |
| + socket_fd_ = kInvalidSocket; |
| + Close(); |
|
mmenke
2014/09/03 14:56:46
This seems like a misuse of Close, since we just w
Chris Masone
2014/09/03 15:57:11
Done.
|
| + return tmp_fd; |
| +} |
| + |
| int SocketLibevent::Bind(const SockaddrStorage& address) { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| DCHECK_NE(kInvalidSocket, socket_fd_); |