-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web support, better round robin engine #2
Conversation
why this PR still not reviewed? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but has some issues
b9d2103
to
7257732
Compare
throw e | ||
} | ||
|
||
await delay(100) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably need to use timeout from arguments
src/engines/single.ts
Outdated
@@ -161,6 +189,6 @@ export class LiteSingleEngine implements LiteEngine { | |||
if (!this.#closed) { | |||
this.connect(); | |||
} | |||
}, 1000); | |||
}, 10000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe do this configurable?
Local implementation of adnl changed to original. Now it has support for tcp:// and ws:// transports. Because of that new engine api changed, maybe time to make 2.0.0 release.
Random bytes imported from tweetnacl instead of crypto, since it's hard to include crypto for browsers and tweetnacl already used in most ton libs.
Round robin engine now uses incremental server select. Also it checks if connection is open to avoid timeouts that we aware of beforehand and retries on errors. It allows to not retry calls when using lib in client/server code.