RTC: Fix clear zombie bug

This commit is contained in:
jinxue.cgh 2020-09-16 21:50:24 +08:00 committed by winlin
parent 2a3b5e5290
commit 27b85c7390

View File

@ -79,7 +79,11 @@ srs_error_t SrsConnectionManager::cycle()
return srs_error_wrap(err, "conn manager");
}
clear();
// Clear all zombies, because we may switch context and lost signal
// when we clear zombie connection.
while (!zombies_.empty()) {
clear();
}
srs_cond_wait(cond);
}