Skip to content

Commit

Permalink
(feature) add reconnect() method to ws2 manager
Browse files Browse the repository at this point in the history
  • Loading branch information
f3rno authored and JacobPlaster committed Feb 3, 2020
1 parent 7b67b1e commit 9e4e3c6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
4.0.2
- WS2Manager: add reconnect method

4.0.1
- WSv2: fix fte and ftu event routing

Expand Down
7 changes: 7 additions & 0 deletions lib/ws2_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ class WS2Manager extends EventEmitter {
}
}

/**
* Reconnects all open sockets
*/
reconnect () {
this._sockets.forEach(socket => socket.ws.reconnect())
}

/**
* Closes all open sockets
*/
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bitfinex-api-node",
"version": "4.0.1",
"version": "4.0.2",
"description": "Node reference library for Bitfinex API",
"engines": {
"node": ">=7"
Expand Down

0 comments on commit 9e4e3c6

Please sign in to comment.