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: define destroy() to close protos #8557

Merged

Conversation

kingluo
Copy link
Contributor

@kingluo kingluo commented Dec 23, 2022

Description

Fixes #8519

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@@ -270,5 +270,10 @@ function _M.init()
end
end

function _M.destroy()
if protos then
protos:close()
Copy link
Member

Choose a reason for hiding this comment

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

Could we add a test to ensure the close is called? For instance, via injecting some code.

end
}
}
--- timeout: 3
Copy link
Member

Choose a reason for hiding this comment

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

The default timeout is already 3 seconds. We don't need to repeat it.

@spacewander spacewander merged commit 0f13916 into apache:master Dec 27, 2022
spacewander pushed a commit to spacewander/incubator-apisix that referenced this pull request Jan 28, 2023
spacewander pushed a commit that referenced this pull request Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: grpc-transcode do not close core.config instance when the plugin is unloaded
3 participants