Skip to content

Conversation

afritzler
Copy link
Member

Proposed Changes

Properly cancel context on os.Exit.

@afritzler afritzler requested a review from a team as a code owner October 19, 2022 13:51
@github-actions github-actions bot added bug Something isn't working size/M labels Oct 19, 2022
@afritzler afritzler force-pushed the fix/context-handling branch from 557dfca to d6ffad5 Compare October 19, 2022 13:55

ctrl.SetLogger(zap.New(zap.UseFlagOptions(&opts)))

ctx, cancel := context.WithCancel(context.Background())
Copy link
Contributor

Choose a reason for hiding this comment

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

How about using ctrl.SetupSignalHandler instead of context.Background? Makes the thing cancellable via SIGINT

Copy link
Member Author

Choose a reason for hiding this comment

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

That is of course a better solution: onmetal/openapi-extractor@fdb35de

@afritzler afritzler merged commit 853df08 into main Oct 19, 2022
@afritzler afritzler deleted the fix/context-handling branch October 19, 2022 13:57
@hardikdr hardikdr added the area/iaas Issues related to IronCore IaaS development. label Jun 26, 2025
@hardikdr hardikdr added this to Roadmap Jun 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/iaas Issues related to IronCore IaaS development. bug Something isn't working size/M

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants