steamutils 1.3.21 → 1.3.22

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/index.js +11 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -990,6 +990,9 @@ class SteamUser {
990
990
  }
991
991
  }
992
992
  }
993
+ if (!g_rgProfileData) {
994
+ g_rgProfileData = {}
995
+ }
993
996
 
994
997
  const lobbyLink = $(`.profile_in_game_joingame a[href*='steam://joinlobby/']`).attr('href')
995
998
  const nickname = $('.persona_name .nickname').text()
@@ -1600,6 +1603,9 @@ class SteamUser {
1600
1603
  params.method = 'GET'
1601
1604
  }
1602
1605
  params.method = params.method.toUpperCase()
1606
+ if (!params.timeout) {
1607
+ params.timeout = 2 * 60000
1608
+ }
1603
1609
 
1604
1610
  return params
1605
1611
  }
@@ -1672,7 +1678,11 @@ class SteamUser {
1672
1678
  await sleep(diff + 10)
1673
1679
  }
1674
1680
  requestTimestamp = now
1675
- response = await axios.request(config)
1681
+ try {
1682
+ response = await axios.request(config)
1683
+ } catch (e) {
1684
+ continue
1685
+ }
1676
1686
 
1677
1687
  this._cookies.setCookies(response.headers["set-cookie"])
1678
1688
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.3.21",
3
+ "version": "1.3.22",
4
4
  "main": "index.js",
5
5
  "dependencies": {
6
6
  "alpha-common-utils": "^1.0.5",