| Index: net/socket/client_socket_pool_base.cc
|
| diff --git a/net/socket/client_socket_pool_base.cc b/net/socket/client_socket_pool_base.cc
|
| index 0880724c94161f8a857829c5c8aac9ec08ed78a3..3e9cd824d7a00765548b1c32bbf6ce2af7a2ab62 100644
|
| --- a/net/socket/client_socket_pool_base.cc
|
| +++ b/net/socket/client_socket_pool_base.cc
|
| @@ -189,7 +189,7 @@ ClientSocketPoolBaseHelper::~ClientSocketPoolBaseHelper() {
|
| // Clean up any idle sockets and pending connect jobs. Assert that we have no
|
| // remaining active sockets or pending requests. They should have all been
|
| // cleaned up prior to |this| being destroyed.
|
| - Flush();
|
| + FlushWithError(ERR_ABORTED);
|
| DCHECK(group_map_.empty());
|
| DCHECK(pending_callback_map_.empty());
|
| DCHECK_EQ(0, connecting_socket_count_);
|
| @@ -903,14 +903,14 @@ void ClientSocketPoolBaseHelper::OnConnectJobComplete(
|
| }
|
|
|
| void ClientSocketPoolBaseHelper::OnIPAddressChanged() {
|
| - Flush();
|
| + FlushWithError(ERR_NETWORK_CHANGED);
|
| }
|
|
|
| -void ClientSocketPoolBaseHelper::Flush() {
|
| +void ClientSocketPoolBaseHelper::FlushWithError(int error) {
|
| pool_generation_number_++;
|
| CancelAllConnectJobs();
|
| CloseIdleSockets();
|
| - AbortAllRequests();
|
| + CancelAllRequestsWithError(error);
|
| }
|
|
|
| bool ClientSocketPoolBaseHelper::IsStalled() const {
|
| @@ -1031,7 +1031,7 @@ void ClientSocketPoolBaseHelper::CancelAllConnectJobs() {
|
| DCHECK_EQ(0, connecting_socket_count_);
|
| }
|
|
|
| -void ClientSocketPoolBaseHelper::AbortAllRequests() {
|
| +void ClientSocketPoolBaseHelper::CancelAllRequestsWithError(int error) {
|
| for (GroupMap::iterator i = group_map_.begin(); i != group_map_.end();) {
|
| Group* group = i->second;
|
|
|
| @@ -1041,7 +1041,7 @@ void ClientSocketPoolBaseHelper::AbortAllRequests() {
|
| it2 != pending_requests.end(); ++it2) {
|
| scoped_ptr<const Request> request(*it2);
|
| InvokeUserCallbackLater(
|
| - request->handle(), request->callback(), ERR_ABORTED);
|
| + request->handle(), request->callback(), error);
|
| }
|
|
|
| // Delete group if no longer needed.
|
|
|