X-Git-Url: http://average.org/gitweb/?a=blobdiff_plain;f=gps303%2Fwsgateway.py;h=381a8558a4218f9d56489425ece81d4c4406e6d8;hb=d6d5b6c95b677d98777959040bac808e4c5499c7;hp=c344e883bacd2c567b3966ac4b052123edc7255b;hpb=c09808cddcddadbe7af392337977707ac27355e9;p=loctrkd.git diff --git a/gps303/wsgateway.py b/gps303/wsgateway.py index c344e88..381a855 100644 --- a/gps303/wsgateway.py +++ b/gps303/wsgateway.py @@ -259,7 +259,7 @@ def runserver(conf: ConfigParser) -> None: global htmlfile initdb(conf.get("storage", "dbfn")) - htmlfile = conf.get("wsgateway", "htmlfile") + htmlfile = conf.get("wsgateway", "htmlfile", fallback=None) # Is this https://github.com/zeromq/pyzmq/issues/1627 still not fixed?! zctx = zmq.Context() # type: ignore zsub = zctx.socket(zmq.SUB) # type: ignore @@ -402,7 +402,9 @@ def runserver(conf: ConfigParser) -> None: towait &= trywrite towait |= morewait except KeyboardInterrupt: - pass + zsub.close() + zctx.destroy() # type: ignore + tcpl.close() if __name__.endswith("__main__"):