Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'subscribers',
'subscription',
'subgift',
'timeout',
'unhost',
'whisper'
]
const clientSettings = {
options: {debug: false, clientId: CLIENT_ID},
connection: {timeout: 20000, reconnect: true, secure: true},
identity: angular.copy(settings.identity),
channels: []
}
client = new Client(clientSettings)
client.connect()
client.on('connected', joinChannels)
onBadLogin(destroy)
forwardEvents(client, ee, events)
client.on('connected', () => {
ee.ready = true
setTimeout(() => $rootScope.$apply(), 0)
})
// Disconnected event gets spammed on every connection
// attempt. This is not ok if the internet is temporarily
// down, for example.
onlyEmitDisconnectedOnce()
function onlyEmitDisconnectedOnce () {