1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Squash: Fix bugs

This commit is contained in:
winlin 2021-12-26 17:30:51 +08:00
parent 10d188faab
commit 716e578a19
382 changed files with 170096 additions and 220 deletions

View file

@ -195,17 +195,20 @@ srs_error_t SrsHybridServer::run()
{
srs_error_t err = srs_success;
// Wait for all servers which need to do cleanup.
SrsWaitGroup wg;
vector<ISrsHybridServer*>::iterator it;
for (it = servers.begin(); it != servers.end(); ++it) {
ISrsHybridServer* server = *it;
if ((err = server->run()) != srs_success) {
if ((err = server->run(&wg)) != srs_success) {
return srs_error_wrap(err, "run server");
}
}
// Wait for all server to quit.
srs_usleep(SRS_UTIME_NO_TIMEOUT);
wg.wait();
return err;
}