Personal tools
  • We're Hiring!

You are here: Home Support FAQ Developer How do I use closeOnDestroy & detachOnDestroy?

How do I use closeOnDestroy & detachOnDestroy?

closeOnDestroy and detachOnDestroy are used to decide whether or not a session will persist after your current client disconnects. If a session is left alive (detached and not closed), then other processes can attach to it and continue processing where the first client left off. If multiple clients connect to a session at the same time, only the setting (closeOnDestroy or detachOnDestroy) of the last session to disconnect will be taken into account. Before that, the session is kept alive.

By default, the setting is "closeOnDestroy". Therefore, if you plan on re-using a session, use detachOnDestroy before calling client.closeSession(). Otherwise, you don't need to worry about either of these methods.

Document Actions