diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-09 17:30:25 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-09 17:30:25 +0000 |
commit | 9bfd098c90a8662d5f68a9eaa997639b215fff1c (patch) | |
tree | 9bafc8f462e633e58780a902b3c31fefa3ff91c4 | |
parent | 53e7aab17f5d57ef3419ba70632caf65de52cda3 (diff) | |
download | chromium_src-9bfd098c90a8662d5f68a9eaa997639b215fff1c.zip chromium_src-9bfd098c90a8662d5f68a9eaa997639b215fff1c.tar.gz chromium_src-9bfd098c90a8662d5f68a9eaa997639b215fff1c.tar.bz2 |
Get rid of the data socket completely when data transfer is finished.
Fixes an FTP transaction hang when we wait for server's response
and the server apparently waits for us.
TEST=See bug.
http://crbug.com/21127
Review URL: http://codereview.chromium.org/192042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25750 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | net/ftp/ftp_network_transaction.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/ftp/ftp_network_transaction.cc b/net/ftp/ftp_network_transaction.cc index 212ec26..c5c9daf 100644 --- a/net/ftp/ftp_network_transaction.cc +++ b/net/ftp/ftp_network_transaction.cc @@ -981,6 +981,10 @@ int FtpNetworkTransaction::DoDataRead() { DCHECK_GT(read_data_buf_len_, 0); if (data_socket_ == NULL || !data_socket_->IsConnected()) { + // If we don't destroy the data socket completely, some servers will wait + // for us (http://crbug.com/21127). + data_socket_.reset(); + // No more data so send QUIT Command now and wait for response. return Stop(OK); } |