Skip to content

Commit a04016a

Browse files
author
Jan Maselj
committed
reconnectInterval check
1 parent 21009ef commit a04016a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "angular-ws-factory",
33
"main": ["src/websocket-wrapper.js"],
4-
"version": "0.2.0",
4+
"version": "0.2.1",
55
"description": "Websocket wrapper.",
66
"license": "MIT",
77
"ignore": []

src/websocket-wrapper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116

117117
// try to reestablish connection
118118
if (options.reconnect) {
119-
if (reconnectInterval) {
119+
if (!reconnectInterval) {
120120
$log.debug('Socket to [%s] will try to reconnect in [%s] ms.', options.url, options.reconnectIntervalTimeout);
121121
reconnectInterval = $interval(that.connect, options.reconnectIntervalTimeout);
122122
}

0 commit comments

Comments
 (0)