Skip to content

Commit

Permalink
Add Toni's suggested words around context cancellation and its inters…
Browse files Browse the repository at this point in the history
…ection with underlying Realtime timeout.
  • Loading branch information
QuintinWillison committed Jul 28, 2021
1 parent 24c4797 commit 07f63ef
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions UPDATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ defer cancel()

This way, the context can be cancelled at the close of the function.

**Note**:
For Realtime operations, cancellation isn't supported by the underlying protocol.
A context cancellation in this case just means that the call returns immediately, without waiting for the operation to finish, with the error provided by the context; but the operation carries on in the background.
Timeouts for these operations are handled separately, with [a configurable realtime request timeout duration](https://pkg.go.dev/github.com/ably/ably-go/ably#WithRealtimeRequestTimeout).

### Client Options now has a Functional Interface

Before version 1.2.0, you instantiated a client using a `ClientOptions` instance created with the `NewClientOptions` function:
Expand Down

0 comments on commit 07f63ef

Please sign in to comment.