Revert "Close FTP stream"

This reverts commit f41d36b264.
This commit is contained in:
Jaex 2016-03-20 18:38:52 +02:00
parent da2b593d00
commit 40c95163ee

View file

@ -179,9 +179,7 @@ public bool UploadData(Stream localStream, string remotePath)
{
using (Stream remoteStream = client.OpenWrite(remotePath))
{
bool result = TransferData(localStream, remoteStream);
remoteStream.Close();
return result;
return TransferData(localStream, remoteStream);
}
}
catch (FtpCommandException e)
@ -193,9 +191,7 @@ public bool UploadData(Stream localStream, string remotePath)
using (Stream remoteStream = client.OpenWrite(remotePath))
{
bool result = TransferData(localStream, remoteStream);
remoteStream.Close();
return result;
return TransferData(localStream, remoteStream);
}
}
@ -271,7 +267,6 @@ public void DownloadFile(string remotePath, Stream localStream)
using (Stream remoteStream = client.OpenRead(remotePath))
{
TransferData(remoteStream, localStream);
remoteStream.Close();
}
}
}