Connect event not firing (General questions)
Hi,
I have a windows NT service which is using the wodSSHCom object inside a thread to connect to a telnet server.
This works the first time i attempt to connect, but if i destroy the object and then recreate it, it then hangs when i call the connect method.
However, as a test i stumbled upon the following.If i make two instances and set the blocking property of the first instance it works ok.
eg.
//removing the next two lines make the app hang when calling connect
FTelnet2 := TwodSSHCom.Create( nil );
FTelnet2.Blocking := true;
FTelnet := TwodSSHCom.Create( nil );
FTelnet.OnConnected := wodSSH1Connected;
FTelnet.KeepAlives := 0;
FTelnet.Timeout := 0;
FTelnet.Blocking := true;
FTelnet.StripANSI := true;
FTelnet.Connect( '***' , 23);
I have added some logging, and the connected event never fires. If i set the timeout to anything above 0, it timeouts but never connects.
This is a really bisazre type probably, which setting the blocking blocking property on a dummy object seems to resolve (i dont actually do anything with the dummy object, but if i free it, then the connect methods starts hanging again).
Anyone have any suggestions?
Thanks.