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 koa router double patched on every request #873

Merged
merged 3 commits into from
Feb 24, 2020

Conversation

rochdev
Copy link
Member

@rochdev rochdev commented Feb 22, 2020

What does this PR do?

Fix koa router double patched on every request by re-patching the entire router and throwing away the old patches on every middleware added.

Motivation

This is a regression introduced in #844. The plugin was changed to patch the routes on dispatch to make sure that the routes are final because koa-router clones the routes internally since this fix. This resulted in the routes being patched again on every single request.

Fixes #870

@rochdev rochdev added bug Something isn't working integrations labels Feb 22, 2020
@rochdev rochdev added this to the 0.18.1 milestone Feb 22, 2020
@rochdev rochdev requested a review from a team as a code owner February 22, 2020 01:48
@rochdev rochdev merged commit 53d1f21 into master Feb 24, 2020
@rochdev rochdev deleted the fix-koa-router-double-patch branch December 20, 2023 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working integrations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stack overflow, high CPU usage after upgrade to 0.17.1
2 participants