klawr / mqtt-inspector

MIT License
2 stars 1 forks source link

Implement proper ctrl+c handling #2

Closed klawr closed 7 months ago

klawr commented 7 months ago

Problem Description At the moment tini has to be utilized to ensure proper ctrl + c handling. https://github.com/klawr/mqtt-inspector/blob/master/Dockerfile#L10

Proposed Solution Implement proper ctrl +c handling by creating a respective token that is injected into the threads that can then shut them down gracefully. See https://doc.rust-lang.org/book/ch20-03-graceful-shutdown-and-cleanup.html for more information.