Core
Framework v2.x
2

off() #

Available since 2.9.0

Unregisters a listener.

If multiple instances of the same listener are registered, only the first one is removed.

off (event: string, listener: ClusterEventHandler): Promise<void>

ArgumentTypeDescription
event
string
Event name
listener
ClusterEventHandler
Listener function to remove.

Usage #

function listener (payload) {
  // ... listener code ...
}

app.cluster.on('some:event', listener);

app.cluster.off('some:event', listener);