When sending with active-x ftp2, we set the connection, send files and when done we close the connection. What we experienced: we had 8 files to send. 4 went well. 3 got errors and the 8th one caused a loop hanging up Chilkat and the calling programm.
First thing we did afterwards was change the calling programm to exit after the first error. We just try connect/send again later. And catch DebugLogFilePath (instead of lasterror only) output.
To replay the error we put a bit more files in place. Server started. Connect done, some files get sent and then we shutdown the server triggering the error. And indeed Chilkat does not seem to handle ok. The DebugLogFilePath's file ends with just lines "Already received close-notify." Growing rapidly while PutFile does not seem to react to any timeout.
PutFile: DllDate: Aug 26 2015 ChilkatVersion: 220.127.116.11 Architecture: Little Endian; 32-bit Language: ActiveX VerboseLogging: 1 LocalFilename: XML.P RemoteFilename: XML.P ProgressMonitoring: enabled: yes heartbeatMs: 0 sendBufferSize: 65536 (leaveContext) IdleTimeoutMs: 60000 ReceiveTimeoutMs: 60000 ConnectTimeoutSeconds: 30 uploadFromLocalFile: localFileSize: 9927 uploadFromDataSource: initialGreeting: 220-hi this is our ftps test 220 restartNext: 0 modeZ: 0 binaryMode: 1 ensureCorrectMode: (leaveContext) pbsz_protp: simpleCommand: sendCommand: prepControlChannel: processAlert: TlsAlert: level: warning descrip: close notify (leaveContext) (leaveContext) Already received close-notify. Already received close-notify. Already received close-notify. Already received close-notify. Etc, etc, ...
The code is simple:
success = ckftp.PutFile(LocalFile,RemoteFile) If (success <> 1) Then 'oke code Else 'not oke code End If
Meanwhile because it could always happen that a ftp server goes down, we have made a nasty workaround starting another vbs (with a timer) prior to the putfile which checks if a putfile ends normal. However we do not like this overhead.
Is the putfile method handled correctly here? I suppose not. Could it be we are doing something wrong?
Many thanks in advance.
I made a change to hopefully prevent this from happening. Please check to see if this new build fixes the problem: