mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Fix crash when quiting. v6.0.151 (#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:
parent
b05f7b4452
commit
da5683e478
10 changed files with 87 additions and 160 deletions
|
@ -201,6 +201,11 @@ if [[ $SRS_SINGLE_THREAD == YES ]]; then
|
|||
else
|
||||
srs_undefine_macro "SRS_SINGLE_THREAD" $SRS_AUTO_HEADERS_H
|
||||
fi
|
||||
if [[ $SRS_SIGNAL_API == YES ]]; then
|
||||
srs_define_macro "SRS_SIGNAL_API" $SRS_AUTO_HEADERS_H
|
||||
else
|
||||
srs_undefine_macro "SRS_SIGNAL_API" $SRS_AUTO_HEADERS_H
|
||||
fi
|
||||
if [[ $SRS_LOG_LEVEL_V2 == YES ]]; then
|
||||
srs_define_macro "SRS_LOG_LEVEL_V2" $SRS_AUTO_HEADERS_H
|
||||
else
|
||||
|
|
|
@ -85,6 +85,7 @@ SRS_CLEAN=YES # Whether do "make clean" when configure.
|
|||
SRS_SIMULATOR=NO # Whether enable RTC simulate API.
|
||||
SRS_GENERATE_OBJS=NO # Whether generate objs and quit.
|
||||
SRS_SINGLE_THREAD=YES # Whether force single thread mode.
|
||||
SRS_SIGNAL_API=NO # Use http API to simulate sending signal to SRS, for debugging.
|
||||
#
|
||||
################################################################
|
||||
# Performance options.
|
||||
|
@ -235,6 +236,7 @@ Experts:
|
|||
--simulator=on|off RTC: Whether enable network simulator. Default: $(value2switch $SRS_SIMULATOR)
|
||||
--generate-objs=on|off RTC: Whether generate objs and quit. Default: $(value2switch $SRS_GENERATE_OBJS)
|
||||
--single-thread=on|off Whether force single thread mode. Default: $(value2switch $SRS_SINGLE_THREAD)
|
||||
--signal-api=on|off Whether support sending signal by HTTP API. Default: $(value2switch $SRS_SIGNAL_API)
|
||||
--build-tag=<TAG> Set the build object directory suffix.
|
||||
--debug=on|off Whether enable the debug code, may hurt performance. Default: $(value2switch $SRS_DEBUG)
|
||||
--debug-stats=on|off Whether enable the debug stats, may hurt performance. Default: $(value2switch $SRS_DEBUG_STATS)
|
||||
|
@ -339,6 +341,7 @@ function parse_user_option() {
|
|||
--simulator) SRS_SIMULATOR=$(switch2value $value) ;;
|
||||
--generate-objs) SRS_GENERATE_OBJS=$(switch2value $value) ;;
|
||||
--single-thread) SRS_SINGLE_THREAD=$(switch2value $value) ;;
|
||||
--signal-api) SRS_SIGNAL_API=$(switch2value $value) ;;
|
||||
--ffmpeg-fit) SRS_FFMPEG_FIT=$(switch2value $value) ;;
|
||||
--ffmpeg-opus) SRS_FFMPEG_OPUS=$(switch2value $value) ;;
|
||||
--h265) SRS_H265=$(switch2value $value) ;;
|
||||
|
@ -681,6 +684,7 @@ function regenerate_options() {
|
|||
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --sanitizer-log=$(value2switch $SRS_SANITIZER_LOG)"
|
||||
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --cygwin64=$(value2switch $SRS_CYGWIN64)"
|
||||
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --single-thread=$(value2switch $SRS_SINGLE_THREAD)"
|
||||
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --signal-api=$(value2switch $SRS_SIGNAL_API)"
|
||||
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --generic-linux=$(value2switch $SRS_GENERIC_LINUX)"
|
||||
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --build-cache=$(value2switch $SRS_BUILD_CACHE)"
|
||||
if [[ $SRS_CROSS_BUILD_ARCH != "" ]]; then SRS_AUTO_CONFIGURE="$SRS_AUTO_CONFIGURE --arch=$SRS_CROSS_BUILD_ARCH"; fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue