mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
testing
This commit is contained in:
1 parent
9e363c9ccf
commit
5a29545d41
14 files changed
+116
-50
No files matched your search
@@ -43,7 +43,7 @@ class Tuna {
|
||||
results.items = results.items.map(s => {
|
||||
s.download = function() {
|
||||
return new Promise((resolve, reject) => {
|
||||
const req = https.get(this.oggPath, (r) => { resolve(r); });
|
||||
const req = https.get(this.oggPath, { maxRedirects: 20 }, (r) => { resolve(r); });
|
||||
req.on("error", (err) => { reject(err); });
|
||||
req.setTimeout(15_000, () => { req.destroy(); reject(new Error("Tuna download timeout")); });
|
||||
});
|
||||
@@ -57,7 +57,7 @@ class Tuna {
|
||||
return this.get("/v1/sounds/" + id).then(sound => {
|
||||
sound.download = function() {
|
||||
return new Promise((resolve, reject) => {
|
||||
const req = https.get(this.oggPath, (result) => { resolve(result); });
|
||||
const req = https.get(this.oggPath, { maxRedirects: 20 }, (result) => { resolve(result); });
|
||||
req.on("error", (err) => { reject(err); });
|
||||
req.setTimeout(15_000, () => { req.destroy(); reject(new Error("Tuna download timeout")); });
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user