diff --git a/xpra/server/http_handler.py b/xpra/server/http_handler.py index e0a73c3c93..0d9bb16252 100644 --- a/xpra/server/http_handler.py +++ b/xpra/server/http_handler.py @@ -145,9 +145,9 @@ def get_headers(self): @classmethod def may_reload_headers(cls, http_headers_dirs): + mtimes = {} if cls.http_headers_cache: #do we need to refresh the cache? - mtimes = {} for d in http_headers_dirs: if os.path.exists(d) and os.path.isdir(d): mtime = os.path.getmtime(d) @@ -176,7 +176,7 @@ def may_reload_headers(cls, http_headers_dirs): continue headers[parts[0]] = parts[1] cls.http_headers_time[d] = mtime - log("may_reload_headers() headers=%s, mtime=%s", headers, mtime) + log("may_reload_headers() headers=%s, mtime=%s", headers, mtimes) cls.http_headers_cache = headers return headers