ArxOne / FTP

Simple FTP client
MIT License
37 stars 15 forks source link

intermittent error with a certain server #21

Closed ontytoom closed 8 years ago

ontytoom commented 8 years ago

I have noticed that sometimes I get an error connecting to a certain server: ftp.ch.freebsd.org

Out of 2000 tests, it failed only 8 times..... so, strangely enough, it only happens sometimes.

It reports an error:

Impossible to parse line: drwxr-xr-x    1 10000    10000          34 Aug 12 

When I look at the server listing for / I see that the only matching line is:

drwxr-xr-x    1 10000    10000          34 Aug 12 00:10 funport

The server claims to be vsFTPd 3.0.2

ontytoom commented 8 years ago

Test program I used (DebugPrintln is any debugging function of your choice):

            int NrTests = 1000;
            int nrSuccess = 0, nrFail = 0;

            for ( int i = 0; i <  NrTests; i++ )
            {
                IEnumerable<FtpEntry> list;

                try
                {
                    list = ftp.ListEntries( "/" );
                    DebugPrintln( list.ToArray().Count().ToString() );
                    nrSuccess++;
                }
                catch ( Exception ex )
                {
                    DebugPrintln( ex.Message );
                    nrFail++;
                }

            }

            DebugPrintln( "Tally: " + NrTests + " tests, of which " + nrSuccess + " passes and " + nrFail + " failed" );
ontytoom commented 8 years ago

Found on latest library from Nuget

picrap commented 8 years ago

It looks like the directory content is not fully transferred, and the data channel is closed before the end. However, I'll take a look at it.

picrap commented 8 years ago

Unfortunately, this works for me...