From 3b82c0da98571fe8fff9ffe0ed271e1540ff5891 Mon Sep 17 00:00:00 2001 From: Luk Lu Date: Wed, 24 Mar 2021 10:25:12 +0800 Subject: [PATCH] u --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 9da0130..a4defa4 100644 --- a/index.js +++ b/index.js @@ -60,7 +60,7 @@ const DAD = (module.exports = class RpcSocket extends ws { } reconnectAsync(url) { - if (this.readyState < ws.CLOSING) { + if (this.readyState === ws.CONNECTING || this.readyState === ws.OPEN) { return Promise.resolve(this) } return new Promise((resolve, reject) => {