interledgerjs / ilp-plugin-btp

This has been moved to the monorepo https://github.com/interledgerjs/interledgerjs
8 stars 7 forks source link

fix: client should clean up timers on connect fail #44

Closed sentientwaffle closed 6 years ago

sentientwaffle commented 6 years ago

If a client connect() aborts, close the WebSocketReconnector and clear its timers so that it doesn't keep retrying in the background.

Also correctly log an authentication error so that it doesn't trigger UnhandledPromiseRejectionWarning.