in reply to Re: NET::FTP - Unexpected EOF on command channel
in thread NET::FTP - Unexpected EOF on command channel
I have, that's how I worked out it was an unexpected EOF!
I don't have the log file available to post as I've gone and deleted it before running another version of the program which as yet hasn't gone wrong, however the bit of code reads like this...
It gets the file and returns 0 if okay, otherwise the it returns code from the server. It doesn't delete yet to move files from the FTP server, it just copies at the moment, and it doesn't cope with EOFs...
$exempt is 421 if I want it to try again later with a timeout...
sub ftp_move() { my $exempt=-1; my $code; $exempt=$_[0] if $_[0]; &write_log("+ [$filename] interesting name, moving to incoming + directory.",0); if($ftp->get($filename,$rvf_incoming.$filename)) { $files_moved++; return 0; } $code=$ftp->code; if($code>=400) { &write_log("| [$filename] error getting from FTP site +- ".$code." $@",0) if $code!=$exempt; $files_error++ if $code!=$exempt; return $code; } return 0; }
|
|---|