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

Refine object create in server.

This commit is contained in:
winlin 2017-06-10 14:19:10 +08:00
parent c32afb95ab
commit 4e4091231e
2 changed files with 5 additions and 13 deletions

View file

@ -483,7 +483,7 @@ SrsServer::SrsServer()
signal_gracefully_quit = false;
pid_fd = -1;
signal_manager = NULL;
signal_manager = new SrsSignalManager(this);
conn_manager = new SrsCoroutineManager();
handler = NULL;
@ -494,10 +494,10 @@ SrsServer::SrsServer()
// new these objects in initialize instead.
http_api_mux = new SrsHttpServeMux();
http_server = new SrsHttpServer(this);
http_heartbeat = NULL;
http_heartbeat = new SrsHttpHeartbeat();
#ifdef SRS_AUTO_INGEST
ingester = NULL;
ingester = new SrsIngester();
#endif
}
@ -570,9 +570,6 @@ srs_error_t SrsServer::initialize(ISrsServerCycle* cycle_handler)
srs_assert(_srs_config);
_srs_config->subscribe(this);
srs_assert(!signal_manager);
signal_manager = new SrsSignalManager(this);
handler = cycle_handler;
if(handler && (err = handler->initialize()) != srs_success){
return srs_error_wrap(err, "handler initialize");
@ -586,13 +583,6 @@ srs_error_t SrsServer::initialize(ISrsServerCycle* cycle_handler)
return srs_error_wrap(err, "http server initialize");
}
http_heartbeat = new SrsHttpHeartbeat();
#ifdef SRS_AUTO_INGEST
srs_assert(!ingester);
ingester = new SrsIngester();
#endif
return err;
}