mirror of
https://github.com/evennia/evennia.git
synced 2026-03-17 05:16:31 +01:00
Merge pull request #1334 from TehomCD/webroot_attr_error_fix
Fix AttributeError when webserver isn't enabled.
This commit is contained in:
commit
cbf2e44dc8
1 changed files with 5 additions and 2 deletions
|
|
@ -174,8 +174,11 @@ class Evennia(object):
|
|||
# (see https://github.com/evennia/evennia/issues/1128)
|
||||
def _wrap_sigint_handler(*args):
|
||||
from twisted.internet.defer import Deferred
|
||||
d = self.web_root.empty_threadpool()
|
||||
d.addCallback(lambda _: self.shutdown(_reactor_stopping=True))
|
||||
if WEBSERVER_ENABLED:
|
||||
d = self.web_root.empty_threadpool()
|
||||
d.addCallback(lambda _: self.shutdown(_reactor_stopping=True))
|
||||
else:
|
||||
d = Deferred(lambda _: self.shutdown(_reactor_stopping=True))
|
||||
d.addCallback(lambda _: reactor.stop())
|
||||
reactor.callLater(1, d.callback, None)
|
||||
reactor.sigInt = _wrap_sigint_handler
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue