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

for #319, api raw update global.listen

This commit is contained in:
winlin 2015-08-30 23:42:21 +08:00
parent 364460f2ab
commit a62c82bd46
3 changed files with 12 additions and 27 deletions

View file

@ -2182,6 +2182,17 @@ int SrsConfig::raw_set_listen(const vector<string>& eps)
SrsConfDirective* listen = root->get("listen");
listen->args = eps;
// force to reload the memory server.
vector<ISrsReloadHandler*>::iterator it;
for (it = subscribes.begin(); it != subscribes.end(); ++it) {
ISrsReloadHandler* subscribe = *it;
if ((ret = subscribe->on_reload_listen()) != ERROR_SUCCESS) {
srs_error("notify subscribes reload listen failed. ret=%d", ret);
return ret;
}
}
srs_trace("reload listen success.");
return ret;
}