• Re: tip.lib check if connected

    From Dan@21:1/5 to All on Mon Sep 4 13:56:24 2023
    Il 19/08/2020 22:01, Darkwood ha scritto:
    On Monday, July 27, 2020 at 4:43:52 PM UTC-7, Darkwood wrote:
    I have a little proggy that zips and FTP's a data backup to my FTP site nightly. This works great for most of my clients, but one has a problem. I noticed that their backups stopped coming through and I couldn't figure out why. So I compiled with
    debugging and copied the .PRG to their computer and stepped through it. I re-connected manually through the "? prompt" in the debugger, and everything worked. I was wondering if there is a fool proof way of checking the connection in the program so we
    can re-connect if we get dis-connected.



    I believe it was a Windoze Update that broke it, but I am not seeing this behavior anywhere else. Here is a snippit of code showing how I fixed it:

    if oFTP:Open( cURL )
    ? "Connection established", oFTP:cReply

    @z,1 say "Connected: "+oFTP:cReply


    ? "Connecting to", server

    ? "Connecting to", server

    I found that if I did a couple oFTP:Open(Curl)'s before I tried to do anything like transfer a file, it worked. I don't know why.


    Maybe a TIMEOUT problem? In http connections (with TIP) we can modify
    this parameter. Sorry I don't use ftp (for now) so I really don't know
    if this suggestion can be of some help.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)