diff --git a/tools/serve/serve.py b/tools/serve/serve.py index 104701caf85ba2..31a08dbd016752 100644 --- a/tools/serve/serve.py +++ b/tools/serve/serve.py @@ -19,10 +19,8 @@ from multiprocessing import Process, Event from localpaths import repo_root -from six.moves import reload_module from manifest.sourcefile import read_script_metadata, js_meta_re, parse_variants -from mozlog.structuredlog import StructuredLogger from wptserve import server as wptserve, handlers from wptserve import stash from wptserve import config @@ -633,10 +631,9 @@ def stop(self): def start_ws_server(host, port, paths, routes, bind_address, config, **kwargs): # Ensure that when we start this in a new process we have the global lock # in the logging module unlocked - reload_module(logging) try: - StructuredLogger._lock.release() - except threading.ThreadError: + logging._releaseLock() + except RuntimeError: pass return WebSocketDaemon(host, str(port), @@ -650,10 +647,9 @@ def start_ws_server(host, port, paths, routes, bind_address, config, **kwargs): def start_wss_server(host, port, paths, routes, bind_address, config, **kwargs): # Ensure that when we start this in a new process we have the global lock # in the logging module unlocked - reload_module(logging) try: - StructuredLogger._lock.release() - except threading.ThreadError: + logging._releaseLock() + except RuntimeError: pass return WebSocketDaemon(host, str(port),