From ebbbd1a14fe248cad7867aca7138cd4d6d60a534 Mon Sep 17 00:00:00 2001 From: Daniel Batica Date: Fri, 6 Nov 2020 11:22:43 +0200 Subject: [PATCH] fix: deadlock on connection onError handler --- src/network/connection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/connection.js b/src/network/connection.js index eed871ef1..0e808ae5e 100644 --- a/src/network/connection.js +++ b/src/network/connection.js @@ -155,8 +155,8 @@ module.exports = class Connection { }) this.logError(error.message, { stack: e.stack }) - await this.disconnect() this.rejectRequests(error) + await this.disconnect() reject(error) }