これは私のコードです:
string my_dir = "";
try
{
my_dir = ftp.GetCurrentDirectory() + "/test";
//It sometimes crashes here. I get timeout error.
}
catch
{
ftp.Close();
ftp.Open();
my_dir = ftp.GetCurrentDirectory() + "/test";
}
ftp は FtpConnection クラスのインスタンスです: http://ftplib.codeplex.com/discussions?searchText=&size=10&page=1
このエラーは、非常に大きなファイルで発生します。再入荷まで2時間ほどお待ちいただきます。それが私がここで尋ねている理由です。catch ブロックのコードは意味がありますか? タイムアウトの問題は修正されますか?