Page 1 of 1

OnAsyncError

Posted: Wed 05 May 2021 10:39
by lasticinfo
Hopefully someone can point me in the right direction?

we are using Secure bridge to implement SSH on a terminal emulation solution. we are experiencing a large number of network disconnects (user connecting via VPN and connection is dropping). if the connection drops we wish to close the application.

I believe we can achieve this by using the OnAsyncError event with ScSSHShell NonBlocking set to true. is anyone able to provide examples or point me in the right direction.

many thanks

Re: OnAsyncError

Posted: Tue 11 May 2021 15:12
by ViktorV
Hi,

Please note that in order to terminate the application in the OnAsyncError event handler you can use the following code:

Code: Select all

procedure TSSHLocalPF.ScSSHChannelAsyncError(Sender: TObject; E: Exception); 
begin 
  Application.Terminate; 
end; 
Best regards,
Viktor