In my application I have a procedure that check a file on a host. The attached routine function as it was designed for as long as the host is up running.
If host has stopped or is not available, the routine fails and I get the error code 35761 (Requested timeout)
My application informs about this and continue to run. The problem is that it seems to get onto a kind of hang. It stops responding and I need to terminate my application the hard way. (task manager)
If I unplug the network connection, the procedure fails with the error code 35754 (unable to connect to remote host) The program inform about this and continue normally.
Does anyone have any clue what the reason to this can be?
Any proposal would be greatly appreciated.
Dim host_name As String, To_Path As String
Dim Username As String, Password As String, RequestTimeout As Byte
Username = "Vestigo"
Password = "Somethingsecret"
RequestTimeout = 5 'seconds
From_Path = "\New_Versions\"
host_name = "ftp://220.127.116.11"
Set objFTP = Me.axFTP.Object
.URL = host_name
.Username = Username
.Password = Password
.RequestTimeout = RequestTimeout
.Execute , "Dir " & From_Path & "Vestigo_*.txt"
Select Case Err
MsgBox "No connection to internet"
MsgBox "Timeout due to host problems"
Set objFTP = Nothing