WaitFor Method - WeOnlyDo Discussion board

WaitFor Method (General questions)

by Ryan, Friday, May 29, 2009, 07:57 (5660 days ago)

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

by wodDamir, Friday, May 29, 2009, 08:46 (5660 days ago) @ 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

by Ryan, Monday, June 01, 2009, 01:31 (5657 days ago) @ wodDamir

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

by woddrazen, Monday, June 01, 2009, 09:27 (5657 days ago) @ Ryan

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

by Marcus de Leon, Friday, October 23, 2009, 17:10 (5512 days ago) @ woddrazen

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

by wodDamir, Friday, October 23, 2009, 17:16 (5512 days ago) @ Marcus de Leon

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