Skip to content

Commit f4ad602

Browse files
fix: remove duplicate callback addition (#2984)
1 parent db390c6 commit f4ad602

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

playwright/_impl/_connection.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,6 @@ def _send_message_to_server(
367367
getattr(task, "__pw_stack_trace__", traceback.extract_stack(limit=10)),
368368
)
369369
callback.no_reply = no_reply
370-
self._callbacks[id] = callback
371370
stack_trace_information = cast(ParsedStackTrace, self._api_zone.get())
372371
frames = stack_trace_information.get("frames", [])
373372
location = (
@@ -399,8 +398,8 @@ def _send_message_to_server(
399398
if self._tracing_count > 0 and frames and object._guid != "localUtils":
400399
self.local_utils.add_stack_to_tracing_no_reply(id, frames)
401400

402-
self._transport.send(message)
403401
self._callbacks[id] = callback
402+
self._transport.send(message)
404403

405404
return callback
406405

0 commit comments

Comments
 (0)