SSHServer hangs when stopping server while clients are connected

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
amiller29au
Posts: 11
Joined: Fri 03 Dec 2010 00:45
Location: AU

SSHServer hangs when stopping server while clients are connected

Post by amiller29au » Fri 31 Aug 2012 01:43

How can I forcefully stop the SSHServer while clients are connected without the server hanging?

I'm calling: TScSSHServer.Active := false;

I've basically used your SimpleSSHServer demo as an example.

amiller29au
Posts: 11
Joined: Fri 03 Dec 2010 00:45
Location: AU

Re: SSHServer hangs when stopping server while clients are connected

Post by amiller29au » Fri 31 Aug 2012 02:11

Never mind, worked it out.

The issue is in WriteLog method from the demo. Hanging on FLockEvent.Acquire .

Add check to ensure SSHServer is Active.

if (FLockEvent = nil) or (not SSHServer.Active) then
Exit;

Still need to get Disconnection logs from happening. So will continue working on this one.

Post Reply