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:
parent
364460f2ab
commit
a62c82bd46
3 changed files with 12 additions and 27 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue