Skip to content

Commit

Permalink
fix(asteroid): Unhandled exception while resume login
Browse files Browse the repository at this point in the history
  • Loading branch information
kb0304 authored and timkinnane committed Sep 24, 2018
1 parent b7bd940 commit 1023103
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/lib/driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,12 @@ export function connect (
asteroid = new Asteroid(config.host, config.useSsl)

setupMethodCache(asteroid) // init instance for later caching method calls
asteroid.on('connected', () => events.emit('connected'))
asteroid.on('connected', () => {
asteroid.resumeLoginPromise.catch(function () {
// pass
})
events.emit('connected')
})
asteroid.on('reconnected', () => events.emit('reconnected'))
let cancelled = false
const rejectionTimeout = setTimeout(function () {
Expand Down

0 comments on commit 1023103

Please sign in to comment.