mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-17 14:10:41 +01:00
Fix exception when stopping the HTTP server if already stopped.
This commit is contained in:
parent
ff2047997a
commit
fa3fc7d20a
@ -180,9 +180,10 @@ def stopServer():
|
|||||||
"""Stops the HTTP server. Should be run only from this module or from
|
"""Stops the HTTP server. Should be run only from this module or from
|
||||||
when the bot is dying (ie. from supybot.world)"""
|
when the bot is dying (ie. from supybot.world)"""
|
||||||
global httpServer
|
global httpServer
|
||||||
log.info('Stopping HTTP server.')
|
if httpServer is not None:
|
||||||
httpServer.shutdown()
|
log.info('Stopping HTTP server.')
|
||||||
httpServer = None
|
httpServer.shutdown()
|
||||||
|
httpServer = None
|
||||||
|
|
||||||
if configGroup.keepAlive():
|
if configGroup.keepAlive():
|
||||||
startServer()
|
startServer()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user