def sighup(signalnum, handler):
            if xmpp.reloading:
                logger.warning('Reload already in progress')
            else:
                xmpp.reloading = True

                try:
                    config = load_config(cfg_fp, reopen=True)
                    logger.info('Reloaded configuration from %s', cfg_fp.name)
                    xmpp.prereload()
                    plugins = load_plugins(config, reinit=True)
                    xmpp.reload(config, plugins=plugins)
                finally:
                    xmpp.reloading = False