Zentitle SDK and Library
7135

Heartbeat terminated

There are two ways in which the library can return a -7135 error:

  1. If the heartbeat is dropped by the client or the lan daemon server, and more than three heartbeats are missed, then the library will return a -7135 error when attemptes are made to check elements out from element pools, or checkout floating features, etc.
  2. If the application heartbeating to the daemon is closed without returning the license, then restarted, requests similar to those above will return a -7135 error.

When a client pulls a license (network seat) from the daemon, it automatically maintains a heartbeat with the daemon. The library does this by starting a heartbeat thread which contacts the daemon once every heartbeat period. During this contact, if any changes have been made to the product license on the daemon, the client license will be updated. The heartbeat thread is terminated when the license is returned to the daemon (NSLReturnLicense()) or at library close (NalpLibClose()). When requests for floating features, elements or even license returns come into the daemon, the daemon checks for the existence of a corresponding heartbeat. If the heartbeat for that client doesn't exist, then the daemon will refuse the transaction with a -7135 error.

If the daemon is shutdown with outstanding licenses, it will cache its known heartbeats. These heartbeats will be recreated when the daemon is restarted. However, just as with the Nalpeiron server, the Nalpeiron daemon never contacts the client, the client contacts the daemon. This means that the clients must heartbeat into the daemon, to maintain these heartbeats.

If the daemon is shutdown for longer than the maximum number of missed heartbeats, the client will have discontinued the heartbeat and will not attempt to re-establish it.

If the client has been shutdown, it will not attempt to renew the heartbeat until and unless NSLGetLicense() is called. In that case, if there is an existing, valid heartbeat (i.e. has not missed too many heartbeats) then the client will attempt to re-connect with that heartbeat rather than create a new heartbeat.

Solution

To resolve a -7135 error, the client should request an NSLGetLicense(), which will result in 1 of 2 outcomes:

  1. If the request is less than 1 heartbeat elapsed time since the loss of the heartbeat, the seat will be re-activated and the heartbeat restarted.
  2. If the elapsed time for the new request is beyond 1 or more heartbeats, a new seat will be created and work as expected, while the previous seat will time out & be removed after 3 heartbeats have elapsed.

Error Codes