--- ftp.pl.orig 2004-10-26 12:03:32.000000000 +0100 +++ ftp.pl 2004-10-26 12:03:47.000000000 +0100 @@ -581,6 +581,9 @@ return 0; } + # shut down our end of the socket + &close_data_socket; + # read the close # $ret = &expect($timeout, @@ -590,9 +593,6 @@ $ret = 0; } - # shut down our end of the socket - &close_data_socket; - if( ! $ret ){ return 0; }