79385237

Date: 2025-01-24 18:00:18
Score: 1.5
Natty:
Report link

If you're trying to close the stream from the receiver then you can cancel the context passed to the stream.

ctx, cancel := context.WithCancel(ctx)
stream, err := client.StreamingRPC(ctx)
// do something on stream
cancel()

Sources:

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: brettinternet