Skip to content

Commit

Permalink
docs: add a note about sunsubscribe by slot migrations
Browse files Browse the repository at this point in the history
Signed-off-by: Rueian <[email protected]>
  • Loading branch information
rueian committed Sep 16, 2024
1 parent 7c8a63e commit 4ccf590
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ err = client.Receive(context.Background(), client.B().Subscribe().Channel("ch1",
The provided handler will be called with the received message.

It is important to note that `client.Receive()` will keep blocking until returning a value in the following cases:
1. return `nil` when receiving any unsubscribe/punsubscribe message related to the provided `subscribe` command.
1. return `nil` when receiving any unsubscribe/punsubscribe message related to the provided `subscribe` command, including `sunsubscribe` messages caused by slot migrations.
2. return `rueidis.ErrClosing` when the client is closed manually.
3. return `ctx.Err()` when the `ctx` is done.
4. return non-nil `err` when the provided `subscribe` command fails.
Expand Down

0 comments on commit 4ccf590

Please sign in to comment.