mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 13:12:03 +00:00
FS-10167 auto change state when joining a thread out of the blue
This commit is contained in:
@@ -198,6 +198,10 @@ KS_DECLARE(uint8_t) ks_thread_priority(ks_thread_t *thread) {
|
||||
|
||||
KS_DECLARE(ks_status_t) ks_thread_join(ks_thread_t *thread) {
|
||||
|
||||
if (thread->state == KS_THREAD_RUNNING) {
|
||||
thread->state = KS_THREAD_SHUTDOWN;
|
||||
}
|
||||
|
||||
if (thread->joined) {
|
||||
return KS_STATUS_DUPLICATE_OPERATION;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user