fix(clients/python): concurrency-safe Session.close() caching the real reply (mxaccessgw#202)
ci / nightly-windev (push) Has been skipped
ci / windows-x86 (push) Successful in 1m22s
ci / java (push) Successful in 2m24s
ci / portable (push) Failing after 4m37s

This commit is contained in:
Joseph Doherty
2026-11-09 12:04:13 -05:00
parent 9007966292
commit 58e9b6a05a
3 changed files with 56 additions and 15 deletions
+4
View File
@@ -103,6 +103,10 @@ async with await GatewayClient.connect(
await session.close()
```
`Session.close()` is concurrency-safe and idempotent: concurrent or repeated
calls issue a single `CloseSession` RPC and return the gateway's real reply (a
failed RPC is not cached, so a later call may retry).
`GatewayClient.open_session_raw`, `GatewayClient.invoke_raw`, and
`GatewayClient.stream_events_raw` keep the generated protobuf replies and
events available for parity tests. `Session` helpers call the method-specific