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.
SSHServer hangs when stopping server while clients are connected
-
- Posts: 11
- Joined: Fri 03 Dec 2010 00:45
- Location: AU
-
- Posts: 11
- Joined: Fri 03 Dec 2010 00:45
- Location: AU
Re: SSHServer hangs when stopping server while clients are connected
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.
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.