SDK Javascript v6.x

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

disconnect #

Closes the current connection to Kuzzle. The SDK then enters the offline state. A call to disconnect() will not trigger a disconnected event. This event is only triggered on unexpected disconnection.

If there are still pending requests during the disconnect call, a discarded event will be issued for each of them.

Arguments #

Copied to clipboard!

Usage #

Copied to clipboard!
try {
  console.log('Successfully disconnected');
} catch (error) {