8000 yet another stats get prediction improvement by Borengar · Pull Request #58 · optix2000/totsugeki · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

yet another stats get prediction improvement #58

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

Merged
merged 1 commit into from
Sep 19, 2021

Conversation

Borengar
Copy link
Contributor

Reset prediction if all expected requests are done or the first request gets called again.

r.Body = io.NopCloser(bytes.NewBuffer(body))
body, _ := io.ReadAll(r.Body)
r.Body = io.NopCloser(bytes.NewBuffer(body))
if strings.HasSuffix(string(body), "07ffffffff\x00") {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume 07ffffffff\x00 is the first R-Code call?

It might be better to pull it from the top of ExpectedRCodeCalls() so this always works as long as ExpectedRCodeCalls is kept up to date.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also removes duplicates of this magic string, since it's also used in AsyncGetStats()

607E 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.

2 participants
0