Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

fix panic caused by multiple closes of pluginFatal channel #1107

Merged
merged 1 commit into from
Oct 24, 2018

Conversation

Dieterbe
Copy link
Contributor

multiple input plugins, or multiple goroutines within a plugin
could try to close the same pluginFatal channel, which
results in a panic.

We fix this by switching to a context and cancelFunc, which
can be called multiple times

fix #870

multiple input plugins, or multiple goroutines within a plugin
could try to close the same pluginFatal channel, which
results in a panic.

We fix this by switching to a context and cancelFunc, which
can be called multiple times

fix #870
@Dieterbe
Copy link
Contributor Author

fun fact: tried to test this with docker-dev-custom-cfg-kafka and docker-compose stop kafka but MT just stays running and keeps trying to reconnect kafka, and succeeds when kafka comes back up again, without invoking the cancel logic. which seems like a good thing.

but the code should be simple enough to be merged by only code reviewing

@Dieterbe Dieterbe merged commit 421734d into master Oct 24, 2018
@Dieterbe Dieterbe deleted the fix-multiple-cancels branch October 29, 2018 09:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

panic during shutdown flow
2 participants