From: Alan T. DeKok Date: Tue, 21 Feb 2012 08:08:44 +0000 (+0100) Subject: Warn if we can't shut down modules cleanly X-Git-Tag: release_2_2_0~161 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=863d67618f03382002df3bab27535f4add5f96fd;p=thirdparty%2Ffreeradius-server.git Warn if we can't shut down modules cleanly --- diff --git a/src/main/modules.c b/src/main/modules.c index b739b79106a..378a0eb1af6 100644 --- a/src/main/modules.c +++ b/src/main/modules.c @@ -356,7 +356,10 @@ static void module_instance_free_old(CONF_SECTION *cs, module_instance_t *node, cf_section_parse_free(cs, mh->insthandle); if (node->entry->module->detach) { - (node->entry->module->detach)(mh->insthandle); + if ((node->entry->module->detach)(mh->insthandle) < 0) { + DEBUG("WARNING: Failed detaching module %s cleanly. Doing forcible shutdown", node->name); + + } } else { free(mh->insthandle); }