steamutils 1.2.10 → 1.2.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/SteamClient.js +9 -2
  2. package/package.json +1 -1
package/SteamClient.js CHANGED
@@ -199,7 +199,9 @@ function SteamClient({
199
199
  }
200
200
  intervalRandoms[key] = setTimeout(function () {
201
201
  doSetInterval(cb, timeout, key)
202
- cb()
202
+ if (state !== 'Offline') {
203
+ cb()
204
+ }
203
205
  }, _.random(timeout[0], timeout[1]))
204
206
  } else {
205
207
  if (intervals[key] !== undefined) {
@@ -208,7 +210,12 @@ function SteamClient({
208
210
  } catch (e) {
209
211
  }
210
212
  }
211
- intervals[key] = setInterval(cb, timeout)
213
+
214
+ intervals[key] = setInterval(function () {
215
+ if (state !== 'Offline') {
216
+ cb()
217
+ }
218
+ }, timeout)
212
219
  }
213
220
 
214
221
  return key
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.2.10",
3
+ "version": "1.2.11",
4
4
  "main": "index.js",
5
5
  "dependencies": {
6
6
  "axios": "^1.3.4",