Skip to content
Snippets Groups Projects
Commit 648907ca authored by François-Simon Fauteux-Chapleau's avatar François-Simon Fauteux-Chapleau Committed by Adrien Béraud
Browse files

UPnPContext: fix deadlock during shutdown

GitLab: #19
Change-Id: Id8adf0faca9e575ce035d7e9a1cc5744d92ef635
parent 423b25b2
No related branches found
No related tags found
No related merge requests found
......@@ -112,6 +112,10 @@ UPnPContext::shutdown()
} else {
if (logger_) logger_->error("Shutdown timed-out");
}
// NOTE: It's important to unlock mappingMutex_ here, otherwise we get a
// deadlock when the call to cv.wait_for() above times out before we return
// from proto->terminate() in shutdown(cv).
lk.unlock();
if (ioContextRunner_) {
if (logger_) logger_->debug("UPnPContext: stopping io_context thread {}", fmt::ptr(this));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment