fix(clients/python): concurrency-safe Session.close() caching the real reply (mxaccessgw#202)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user