Page 1 of 1

TCPKeepAlive doesn't work?

Posted: Sat 04 Dec 2010 20:58
by zd
Hi!

I'm using SecureBridge with IBDAC.

TCPKeepAlive is set to true in both SSH server and client Options. I'm also doing port forwarding with two ScSSHChannels.

If I set up two computers and run the server on one and the client on the other, I can make a connection and use the components without problems.

But if I hibernate the server computer or disconnect it from the Internet no errors or events are raised on the client's side. If I make a DB query using IBDAC, my program goes into an endless loop and I can only close it using the Task manager in Windows.

How can I detect the loss of connection on the client's side?

Thanks!

Posted: Mon 06 Dec 2010 09:32
by Dimon
When connection between SSH client and SSH server is aborted, then the TScSSHClient.AfterDisconnect event is arised. To solve the problem you should disconnet all channels in this event handler.