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

add OnUpgrade callback #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kokizzu
Copy link

@kokizzu kokizzu commented May 4, 2023

related to this: coredns/coredns#6074

so all plugin that require releasing port can add themself to this callback.

@chrisohaver
Copy link
Member

Maybe instead of adding a new callback, call existing OnShutdown callbacks during Upgrade?

@kokizzu
Copy link
Author

kokizzu commented May 5, 2023

Just not sure if this will affect every plugin and giving unexpected behavior instead of just plugins that require closing socket

@kokizzu
Copy link
Author

kokizzu commented May 5, 2023

yup, can't do, if i call shutdown before upgrade, it would change a lot of plugins behavior because normally OnShutdown called after new forked process is up, so it's better to call different event (OnUpgrade) instead (or maybe name this OnBeforeUpgrade?)

Signed-off-by: Kiswono Prayogo <kiswono@gmail.com>
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.

None yet

2 participants