}
},
"expect": {
- "version": "27.1.1",
- "resolved": "https://registry.npmjs.org/expect/-/expect-27.1.1.tgz",
- "integrity": "sha512-JQAzp0CJoFFHF1RnOtrMUNMdsfx/Tl0+FhRzVl8q0fa23N+JyWdPXwb3T5rkHCvyo9uttnK7lVdKCBl1b/9EDw==",
+ "version": "27.2.0",
+ "resolved": "https://registry.npmjs.org/expect/-/expect-27.2.0.tgz",
+ "integrity": "sha512-oOTbawMQv7AK1FZURbPTgGSzmhxkjFzoARSvDjOMnOpeWuYQx1tP6rXu9MIX5mrACmyCAM7fSNP8IJO2f1p0CQ==",
"dev": true,
"requires": {
"@jest/types": "^27.1.1",
"ansi-styles": "^5.0.0",
"jest-get-type": "^27.0.6",
- "jest-matcher-utils": "^27.1.1",
- "jest-message-util": "^27.1.1",
+ "jest-matcher-utils": "^27.2.0",
+ "jest-message-util": "^27.2.0",
"jest-regex-util": "^27.0.6"
},
"dependencies": {
}
},
"jest-diff": {
- "version": "27.1.1",
- "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.1.1.tgz",
- "integrity": "sha512-m/6n5158rqEriTazqHtBpOa2B/gGgXJijX6nsEgZfbJ/3pxQcdpVXBe+FP39b1dxWHyLVVmuVXddmAwtqFO4Lg==",
+ "version": "27.2.0",
+ "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.2.0.tgz",
+ "integrity": "sha512-QSO9WC6btFYWtRJ3Hac0sRrkspf7B01mGrrQEiCW6TobtViJ9RWL0EmOs/WnBsZDsI/Y2IoSHZA2x6offu0sYw==",
"dev": true,
"requires": {
"chalk": "^4.0.0",
"diff-sequences": "^27.0.6",
"jest-get-type": "^27.0.6",
- "pretty-format": "^27.1.1"
+ "pretty-format": "^27.2.0"
}
},
"jest-get-type": {
"dev": true
},
"jest-matcher-utils": {
- "version": "27.1.1",
- "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.1.1.tgz",
- "integrity": "sha512-Q1a10w9Y4sh0wegkdP6reQOa/Dtz7nAvDqBgrat1ItZAUvk4jzXAqyhXPu/ZuEtDaXaNKpdRPRQA8bvkOh2Eaw==",
+ "version": "27.2.0",
+ "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.2.0.tgz",
+ "integrity": "sha512-F+LG3iTwJ0gPjxBX6HCyrARFXq6jjiqhwBQeskkJQgSLeF1j6ui1RTV08SR7O51XTUhtc8zqpDj8iCG4RGmdKw==",
"dev": true,
"requires": {
"chalk": "^4.0.0",
- "jest-diff": "^27.1.1",
+ "jest-diff": "^27.2.0",
"jest-get-type": "^27.0.6",
- "pretty-format": "^27.1.1"
+ "pretty-format": "^27.2.0"
}
},
"jest-message-util": {
- "version": "27.1.1",
- "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.1.1.tgz",
- "integrity": "sha512-b697BOJV93+AVGvzLRtVZ0cTVRbd59OaWnbB2D75GRaIMc4I+Z9W0wHxbfjW01JWO+TqqW4yevT0aN7Fd0XWng==",
+ "version": "27.2.0",
+ "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.2.0.tgz",
+ "integrity": "sha512-y+sfT/94CiP8rKXgwCOzO1mUazIEdEhrLjuiu+RKmCP+8O/TJTSne9dqQRbFIHBtlR2+q7cddJlWGir8UATu5w==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.12.13",
"chalk": "^4.0.0",
"graceful-fs": "^4.2.4",
"micromatch": "^4.0.4",
- "pretty-format": "^27.1.1",
+ "pretty-format": "^27.2.0",
"slash": "^3.0.0",
"stack-utils": "^2.0.3"
},
"dev": true
},
"pretty-format": {
- "version": "27.1.1",
- "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.1.1.tgz",
- "integrity": "sha512-zdBi/xlstKJL42UH7goQti5Hip/B415w1Mfj+WWWYMBylAYtKESnXGUtVVcMVid9ReVjypCotUV6CEevYPHv2g==",
+ "version": "27.2.0",
+ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.2.0.tgz",
+ "integrity": "sha512-KyJdmgBkMscLqo8A7K77omgLx5PWPiXJswtTtFV7XgVZv2+qPk6UivpXXO+5k6ZEbWIbLoKdx1pZ6ldINzbwTA==",
"dev": true,
"requires": {
"@jest/types": "^27.1.1",
this.hasSocketRestarted = false;
}
- private async onClose(code: number): Promise<void> {
+ private async onClose(code: number, reason: string): Promise<void> {
switch (code) {
- case WebSocketCloseEventStatusCode.CLOSE_NORMAL: // Normal close
+ // Normal close
+ case WebSocketCloseEventStatusCode.CLOSE_NORMAL:
case WebSocketCloseEventStatusCode.CLOSE_NO_STATUS:
- logger.info(`${this.logPrefix()} Socket normally closed with status '${Utils.getWebSocketCloseEventStatusString(code)}'`);
+ logger.info(`${this.logPrefix()} Socket normally closed with status '${Utils.getWebSocketCloseEventStatusString(code)}' and reason '${reason}'`);
this.autoReconnectRetryCount = 0;
break;
- default: // Abnormal close
- logger.error(`${this.logPrefix()} Socket abnormally closed with status '${Utils.getWebSocketCloseEventStatusString(code)}'`);
+ // Abnormal close
+ default:
+ logger.error(`${this.logPrefix()} Socket abnormally closed with status '${Utils.getWebSocketCloseEventStatusString(code)} and reason '${reason}'`);
await this.reconnect(code);
break;
}