@urbit/http-api: tweak resubscribe timing

This commit is contained in:
Liam Fitzgerald 2021-07-22 13:17:28 +10:00
parent 1375a7fac1
commit ccfc8fc456
No known key found for this signature in database
GPG Key ID: D390E12C61D1CFFB

View File

@ -250,7 +250,8 @@ export class Urbit {
}
},
onerror: (error) => {
if(!(error instanceof FatalError) && this.errorCount++ < 5) {
console.warn(error);
if(!(error instanceof FatalError) && this.errorCount++ < 4) {
this.onRetry && this.onRetry();
return Math.pow(2, this.errorCount - 1) * 750;
}