Skip to content

Commit

Permalink
fix: get timeouts right in the http requester (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyyynthia authored Oct 30, 2023
1 parent ca30ac3 commit 46206ed
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
4 changes: 0 additions & 4 deletions src/client/export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ export default class ExportClient {
method: 'POST',
path: `${this.requester.projectUrl}/export`,
body: { ...req, zip: true },
headersTimeout: 300,
bodyTimeout: 300,
});
}

Expand All @@ -32,8 +30,6 @@ export default class ExportClient {
method: 'POST',
path: `${this.requester.projectUrl}/export`,
body: { ...req, zip: false },
headersTimeout: 300,
bodyTimeout: 300,
});
}
}
2 changes: 0 additions & 2 deletions src/client/import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ export default class ImportClient {
method: 'PUT',
path: `${this.requester.projectUrl}/import/apply`,
query: { forceMode: req?.forceMode },
headersTimeout: 300,
bodyTimeout: 300,
});
}

Expand Down
4 changes: 2 additions & 2 deletions src/client/internal/requester.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ export default class Requester {
method: req.method,
headers: headers,
body: body,
headersTimeout: req.headersTimeout,
bodyTimeout: req.bodyTimeout,
headersTimeout: req.headersTimeout ?? 300_000,
bodyTimeout: req.bodyTimeout ?? 300_000,
});

debug(
Expand Down

0 comments on commit 46206ed

Please sign in to comment.