FTP Error - Previous Request Not Completed

Andre Garzia andre at andregarzia.com
Wed Oct 28 13:02:13 CDT 2009


Err, if you close it then you're really aborting it midway which will give
you a corrupted file on the server you're uploading to. There are many ways
around this, what I do is:

1) Use liburlsetstatuscallback call to create a routine that will receive
periodic status reports from liburl.
2) Maintain a download queue
3) if the callback receives a call that says that a file transfer is
completed, then pick the next one in the queue.
4) if there's a recoverable error such as a timeout, then I restart the same
transfer
5) if there's an unrecoverable error such as the server being hit by a
meteor, I gracefuly exit the routine

This way, there's no collision, I will only start a transfer when I trully
know that the previous one finished.

On Wed, Oct 28, 2009 at 3:55 PM, Warren Kuhl <warrenkuhl at gmail.com> wrote:

> Andre,
>
> Thanks for the explanation.  Is there anyway for me to check if there is
> another connection open and close it?
>
> Warren
>
> On Wed, Oct 28, 2009 at 12:53 PM, Andre Garzia <andre at andregarzia.com
> >wrote:
>
> > Warren,
> >
> > you can maintain only one connection (file transfer) at a time, if you
> > request a file transfer and the previous one is not finished yet, this is
> > the error you get.
> >
> > :D
> >
> > On Wed, Oct 28, 2009 at 3:35 PM, Warren Kuhl <warrenkuhl at gmail.com>
> wrote:
> >
> > > Does anyone know why I am getting the 'Previous Request Not Completed'
> > > error
> > > when FTPing files to a server.  I have a process that loops through a
> > list
> > > of files and uploads them to my server using the put url command.  It
> > seems
> > > to fail halfway and I get this error.  Then when I try to run the
> program
> > > again...I still get this error.
> > >
> > > Thanks,
> > > Warren Kuhl
> > > _______________________________________________
> > > use-revolution mailing list
> > > use-revolution at lists.runrev.com
> > > Please visit this url to subscribe, unsubscribe and manage your
> > > subscription preferences:
> > > http://lists.runrev.com/mailman/listinfo/use-revolution
> > >
> >
> >
> >
> > --
> > http://www.andregarzia.com All We Do Is Code.
> > _______________________________________________
> > use-revolution mailing list
> > use-revolution at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-revolution
> >
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



-- 
http://www.andregarzia.com All We Do Is Code.



More information about the use-livecode mailing list