mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-14 11:06:36 +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) {
|
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) {
|
if (thread->joined) {
|
||||||
return KS_STATUS_DUPLICATE_OPERATION;
|
return KS_STATUS_DUPLICATE_OPERATION;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user