Atozed Forums
Reconnect TIWimer - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software Products (https://www.atozed.com/forums/forumdisplay.php?fid=1)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forumdisplay.php?fid=3)
+---- Forum: English (https://www.atozed.com/forums/forumdisplay.php?fid=16)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forumdisplay.php?fid=4)
+----- Thread: Reconnect TIWimer (/showthread.php?tid=989)

Pages: 1 2


Reconnect TIWimer - Rassamaha78 - 03-09-2019

If the connection is lost ( bad Internet ), the timer does not recover when the connection reappears. How to resume the timer when the connection is active again ?

The timer is triggered 1 time per second. I use the method OnAsyncTimer.


RE: Reconnect TIWimer - Alexandre Machado - 03-10-2019

The timer should recover. ServerController.JavaScriptOptions.AjaxErrorMode controls how Ajax errors are handled on the browser side.

If you set it to emNone it will just ignore the erros and continue working, i.e. it will send request to the server, even if the prior request failed.

Can you please test it and let me know?


RE: Reconnect TIWimer - Rassamaha78 - 03-10-2019

(03-10-2019, 04:43 AM)Alexandre Machado Wrote: The timer should recover. ServerController.JavaScriptOptions.AjaxErrorMode controls how Ajax errors are handled on the browser side.

If you set it to emNone it will just ignore the erros and continue working, i.e. it will send request to the server, even if the prior request failed.

Can you please test it and let me know?

I set the setting ServerController.JavaScriptOptions.AjaxErrorMode to emNone from the beginning. Inside the timer OnAsyncTimer i use a "try except end" construct.
If to install brekpoint in the timer, after disconnecting the Internet cable, the timer stops calling the OnAsyncTimer, this is of course normal, but after returning the Internet cable back, the timer does not resume its work, you have to refresh the page in the browser.


RE: Reconnect TIWimer - Alexandre Machado - 03-12-2019

Hum... yes, you are correct.

The issue here is that the timer gets reactivated when processing the response. If the response fails, the timer doesn't get reactivated.

I'll have a look and see if I can find a workaround. I'll keep you informed, OK?


RE: Reconnect TIWimer - Alexandre Machado - 03-12-2019

I have some working code but I need to know your exact IW version in order to provide you a patch


RE: Reconnect TIWimer - Rassamaha78 - 03-13-2019

(03-12-2019, 09:32 AM)Alexandre Machado Wrote: I have some working code but I need to know your exact IW version in order to provide you a patch

IW 14.2.8


RE: Reconnect TIWimer - Alexandre Machado - 03-13-2019

Give me 1-2 days to prepare it.


RE: Reconnect TIWimer - Rassamaha78 - 05-22-2019

(03-13-2019, 11:05 AM)Alexandre Machado Wrote: Give me 1-2 days to prepare it.

Are there any options to solve this problem ?


RE: Reconnect TIWimer - Alexandre Machado - 05-24-2019

Porting to IW 14.2.8 showed more complicated than I first thought and I had to stop it to take care of other things. I'll see if I can proceed on it today and let you know.


RE: Reconnect TIWimer - Rassamaha78 - 05-29-2019

(05-24-2019, 04:12 AM)Alexandre Machado Wrote: Porting to IW 14.2.8 showed more complicated than I first thought and I had to stop it to take care of other things. I'll see if I can proceed on it today and let you know.

Tell me, is this problem solved in version 15.0.19? I read that:
Quote:Modified
  • IWTimer is able to recover from Ajax calls errors (e.g. due to connectivity issues). ServerController.JavaScriptOptions.AjaxErrorMode should be set to emNone or emConsole.

If I buy an upgrade to this version, will I be able to automatically restart the timer after a failed request to the server?