steamutils 1.1.20 → 1.1.21
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +3 -3
- package/package.json +1 -1
package/index.js
CHANGED
@@ -1507,10 +1507,10 @@ class SteamUser {
|
|
1507
1507
|
|
1508
1508
|
let now = 0
|
1509
1509
|
let diff = 0
|
1510
|
-
while ((diff = (now = new Date().getTime()) - requestTimestamp) <
|
1511
|
-
await sleep(diff +
|
1510
|
+
while ((diff = (now = new Date().getTime()) - requestTimestamp) < 500) {
|
1511
|
+
await sleep(diff + 10)
|
1512
1512
|
}
|
1513
|
-
requestTimestamp =
|
1513
|
+
requestTimestamp = now
|
1514
1514
|
response = await axios.request(config)
|
1515
1515
|
|
1516
1516
|
this._cookies.setCookies(response.headers["set-cookie"])
|