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

Refactor code, add stop for hybrid server to do cleanup.

This commit is contained in:
winlin 2020-01-23 21:16:34 +08:00
parent db5788b205
commit 7c9b31815f
5 changed files with 38 additions and 0 deletions

View file

@ -420,14 +420,19 @@ srs_error_t run_hybrid_server()
_srs_hybrid->register_server(new SrtServerAdapter());
#endif
// Do some system initialize.
if ((err = _srs_hybrid->initialize()) != srs_success) {
return srs_error_wrap(err, "hybrid initialize");
}
// Should run util hybrid servers all done.
if ((err = _srs_hybrid->run()) != srs_success) {
return srs_error_wrap(err, "hybrid run");
}
// After all done, stop and cleanup.
_srs_hybrid->stop();
return err;
}