OnAsyncError

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
lasticinfo
Posts: 1
Joined: Wed 05 May 2021 10:33

OnAsyncError

Post by lasticinfo » Wed 05 May 2021 10:39

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

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: OnAsyncError

Post by ViktorV » Tue 11 May 2021 15:12

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

Post Reply