commit 10df878a9deed7210a5b58489c73ecf68667fae2
parent 345288c32f8ba6d1d9b50b4a419d4719c336acb4
Author: Sam Sneddon <gsnedders@apple.com>
Date: Fri, 7 Nov 2025 08:56:21 +0000
Bug 1998487 [wpt PR 55855] - Move H2ConnectionGuard lock to be connection-specific, a=testonly
Automatic update from web-platform-tests
Move H2ConnectionGuard lock to be connection-specific
This helps avoid #51981, where we frequently saw timeouts from the H2
server, by avoiding holding a global lock across all connections to
the H2 server.
--
wpt-commits: 2835fc21702841d140bad6701fd5aec0df38d312
wpt-pr: 55855
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/testing/web-platform/tests/tools/wptserve/wptserve/server.py b/testing/web-platform/tests/tools/wptserve/wptserve/server.py
@@ -758,11 +758,10 @@ class Http2WebTestRequestHandler(BaseWebTestRequestHandler):
class H2ConnectionGuard:
"""H2Connection objects are not threadsafe, so this keeps thread safety"""
- lock = threading.Lock()
-
def __init__(self, obj):
assert isinstance(obj, H2Connection)
self.obj = obj
+ self.lock = threading.Lock()
def __enter__(self):
self.lock.acquire()