mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine code, donot listen if not enabled http
This commit is contained in:
parent
ec6d696565
commit
0ba0c14fb8
1 changed files with 5 additions and 1 deletions
|
@ -307,7 +307,8 @@ int SrsServer::listen()
|
|||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef SRS_HTTP_API
|
||||
if (_srs_config->get_http_api_enabled()) {
|
||||
SrsListener* listener = new SrsListener(this, SrsListenerHttpApi);
|
||||
listeners.push_back(listener);
|
||||
|
@ -318,7 +319,9 @@ int SrsServer::listen()
|
|||
return ret;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SRS_HTTP_SERVER
|
||||
if (_srs_config->get_http_stream_enabled()) {
|
||||
SrsListener* listener = new SrsListener(this, SrsListenerHttpStream);
|
||||
listeners.push_back(listener);
|
||||
|
@ -329,6 +332,7 @@ int SrsServer::listen()
|
|||
return ret;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue