Skip to content

fix: define destroy() to close protos#8557

Merged
spacewander merged 3 commits into
apache:masterfrom
kingluo:reload_bugfix_grpc_transcode_plugin
Dec 27, 2022
Merged

fix: define destroy() to close protos#8557
spacewander merged 3 commits into
apache:masterfrom
kingluo:reload_bugfix_grpc_transcode_plugin

Conversation

@kingluo

@kingluo kingluo commented Dec 23, 2022

Copy link
Copy Markdown
Contributor

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)


function _M.destroy()
if protos then
protos:close()

Copy link
Copy Markdown
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.

Comment thread t/plugin/grpc-transcode-reload-bugfix.t Outdated
end
}
}
--- timeout: 3

Copy link
Copy Markdown
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