steamutils 1.2.10 → 1.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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",