Fixed a bug in the threading code that would prevent new threads starting.
[citadel.git] / citadel / sysdep.c
index 732dbc4206a727e4ee86bb7b3529762dad6bfa39..433f3467b1e8a659d566f168945917bbd174aa60 100644 (file)
@@ -1123,6 +1123,9 @@ void InitializeMasterCC(void) {
  * Bind a thread to a context.  (It's inline merely to speed things up.)
  */
 INLINE void become_session(struct CitContext *which_con) {
+       if (which_con)
+               ctdl_thread_internal_change_state(CT, CTDL_THREAD_RUNNING);
+
        citthread_setspecific(MyConKey, (void *)which_con );
 }