mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-14 08:05:37 +00:00
FS-10167 auto change state when joining a thread out of the blue
This commit is contained in:
parent
82e510a54d
commit
aa526a5363
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user