WaitFor Method (General questions)
Hi,
I have a situation where i am calling the WaitFor method to wait for a specific character, however it never seems to be returning and never times out.
I have tried passing a timeout to this routine but it doesn't seem to make a difference.
Normally everything works and it times out, however i have found when a record is locked on the database that we are accesing via telnet then this condition occurs where the waitfor never returns.
Have you experienced this before? Is there a know workaround?
Let me know if you need any further info.
Thanks,
Ryan.
Re: WaitFor Method
Hi Ryan,
We didn't have such reports so far. Can you add more debugging to your code, to see if the method is executed?
Can you show me a code snippet where this happens?
Regards,
Damba
Re: WaitFor Method
Hi,
Method is definitly being executed. I have added a line of logging code before the method and after it. Line before gets logged but line after never happens.
Here is the code i use:
writeLog( Before Wait );
returnedData := FTelnet.WaitFor( SearchData , FMainTimeout );
writeLog( After Wait );
In most cases this works correctly and returns the after the match or timeout, however in some cases (such as a database file lock) it never returns and blocks forever.
Any suggestions?
Thanks,
Ryan.
Hi Ryan,
We didn't have such reports so far. Can you add more debugging to your code, to see if the method is executed?
Can you show me a code snippet where this happens?
Regards,
Damba
Re: WaitFor Method
Ryan,
Can we somehow duplicator this problem?
What happened if you connect to that server and try to execute some command while database is local using some other Telnet client like Putty for example?
Drazen
Re: WaitFor Method
Hi,
The same thing is happening to me. However I set the timeout to 30 seconds, but it may block up to 5 minutes. Any ideas?
Thanks,
Marcus
Ryan,
Can we somehow duplicator this problem?What happened if you connect to that server and try to execute some command while database is local using some other Telnet client like Putty for example?
Drazen
Re: WaitFor Method
Hi Marcus,
Did you try the latest version of the component?
Which Timeout did you set? Thru Timeout property, or using the Timeout parameter in WaitFor call?
Regards,
Damba