X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fthreads.c;h=1afad1cfcac72aa64d8a699c58cf070b821d1b42;hb=d62a8c8ef6806683067f0c25f243b67206f787a1;hp=ec64ceaefb4407b345ed5858cb010e4f15a093ae;hpb=891e7a01c4282d831004eb6387b24510ea3c2a37;p=citadel.git diff --git a/citadel/threads.c b/citadel/threads.c index ec64ceaef..1afad1cfc 100644 --- a/citadel/threads.c +++ b/citadel/threads.c @@ -352,7 +352,9 @@ void CtdlThreadStopAll(void) { /* First run any registered shutdown hooks. This probably doesn't belong here. */ PerformSessionHooks(EVT_SHUTDOWN); - + + /* then close all tcp ports so nobody else can talk to us anymore. */ + CtdlShutdownServiceHooks(); //FIXME: The signalling of the condition should not be in the critical_section // We need to build a list of threads we are going to signal and then signal them afterwards @@ -712,7 +714,10 @@ void CtdlThreadGC (void) if ((that_thread->state == CTDL_THREAD_STOP_REQ || that_thread->state == CTDL_THREAD_STOPPING) && (!citthread_equal(that_thread->tid, citthread_self()))) - CtdlLogPrintf(CTDL_DEBUG, "Waiting for thread %s (0x%08lx) to exit.\n", that_thread->name, that_thread->tid); + { + CtdlLogPrintf(CTDL_DEBUG, "Waiting for thread %s (0x%08lx) to exit.\n", that_thread->name, that_thread->tid); + terminate_stuck_sessions(); + } else { /**