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

Fix crash when quiting. v6.0.151 v7.0.10 (#4157)

1. Remove the srs_global_dispose, which causes the crash when still
publishing when quit.
2. Always call _srs_thread_pool->initialize for single thread.
3. Support `--signal-api` to send signal by HTTP API, because CLion
eliminate the signals.

---

Co-authored-by: Jacob Su <suzp1984@gmail.com>
This commit is contained in:
Winlin 2024-08-24 22:40:39 +08:00 committed by GitHub
parent cc6db250fb
commit f8319d6b6d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 89 additions and 161 deletions

View file

@ -784,6 +784,13 @@ srs_error_t SrsServer::http_handle()
}
#endif
#ifdef SRS_SIGNAL_API
// Simulate the signal by HTTP API, for debug signal issues in CLion.
if ((err = http_api_mux->handle("/api/v1/signal", new SrsGoApiSignal())) != srs_success) {
return srs_error_wrap(err, "handle signal errors");
}
#endif
// metrics by prometheus
if ((err = http_api_mux->handle("/metrics", new SrsGoApiMetrics())) != srs_success) {
return srs_error_wrap(err, "handle tests errors");