Skip to content
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

fix: BotServer #9

Closed
wants to merge 1 commit into from

Conversation

luanluciano93
Copy link

  • several people have reported issues with v8 recently. The problem originates from the botserver and this PR fixes it!

credits: @Leesneaks

@Leesneaks
Copy link

There's also an issue where the Bot server doesn't clear out the websockets on clear() as it .cancel(socket) where socket is always 1, yet the index is the actual operation ID.

This makes sure it clears it from HTTP.operations as well.
The next connection will still keep the older index as this is done within the client int operationId = m_operationId++;

I've had no issues with it.
Leesneaks/otclientv8@119f93d

@Leesneaks
Copy link

@luanluciano93 I removed the onopen.
Whilst it works,, whilst updating my botserver, I noticed there's a way to crash people (not instantly) via BotServer and it'll cause an infinite loop spamming the warn messages.

I updated it slightly in this Leesneaks/otclientv8@a5a2661
by using onError to look for resolve error, this way if it can't connect it'll just stop trying. rather than looping.
This works well for me, but i could see some issues with people with bad internet having an issue or two.

Could be modified to try to reconnect a few times on resolve error, rather than 10x but thats down to whoever wants to include it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants