Skip to content

Commit eaea2ba

Browse files
authored
fix: limit updateInterval to 2,147,483,647ms to prevent TimeoutOverflowWarning (#201)
1 parent c01d90d commit eaea2ba

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ function validateInput(opts: IUpdateElectronAppOptions) {
345345
);
346346

347347
assert(ms(updateInterval) >= 5 * 60 * 1000, 'updateInterval must be `5 minutes` or more');
348+
assert(ms(updateInterval) < 2 ** 31, 'updateInterval must fit in a signed 32-bit integer');
348349

349350
assert(logger && typeof logger.log, 'function');
350351

0 commit comments

Comments
 (0)