Page 1 of 1

SSHServer hangs when stopping server while clients are connected

Posted: Fri 31 Aug 2012 01:43
by amiller29au
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.

Re: SSHServer hangs when stopping server while clients are connected

Posted: Fri 31 Aug 2012 02:11
by amiller29au
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.