0
votes

Worklight 6.1.0.1 If I have a worklight server session timeout set to 1 hour, and I don't have a heartbeat interval set. The application starts, and establishes a connection with the WL server.

The WL server is shutdown, and not restarted. If the application does not invoke any back requests to the WL server (ex: connect, adapter, etc) while the server is stopped will the loss of connection be detected, or would I have had to set a heartbeat interval to cause the loss of connection to be detected?

2

2 Answers

0
votes

If you did not write applicative code to handle off line scenarios, none is going to do that for you.

Consult with the Working Offline training module.

0
votes

If you want to detect the loss of server connection please use the following

  • Events that are fired only on change of connectivity state. Success <--> Failure WL.Events.WORKLIGHT_IS_CONNECTED and WORKLIGHT_IS_DISCONNECTED. For more info see this link
  • use onConnectionFailure in initOptions to figure out server connection failure. See this SO answer for more info.