Skip to content

Commit

Permalink
v2.0.1 release (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
2pd authored Feb 22, 2023
1 parent 0f590a6 commit fa81a1e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Changelog


## v2.0.1 - 2023-02-22

### Updated
- Fixed WebSocket onClose event issue

## v2.0.0 - 2023-01-31

### Updated
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@binance/connector",
"version": "2.0.0",
"version": "2.0.1",
"description": "This is a lightweight library that works as a connector to the Binance public API.",
"main": "src/index.js",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion src/modules/websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,8 @@ const Websocket = superclass => class extends superclass {

ws.on('close', (closeEventCode, reason) => {
if (!wsRef.closeInitiated) {
this.logger.error(`Connection close due to ${closeEventCode}: ${reason}.`)
callbacks.close && callbacks.close()
this.logger.warn(`Connection close due to ${closeEventCode}: ${reason}.`)
setTimeout(() => {
this.logger.debug('Reconnect to the server.')
initConnect()
Expand Down

0 comments on commit fa81a1e

Please sign in to comment.