fix documentation for CancelWrite after Close on the send stream (#4419)

This commit is contained in:
Marten Seemann
2024-04-13 16:36:49 -07:00
committed by GitHub
parent b096e94092
commit 857c31dc7c

View File

@@ -124,7 +124,9 @@ type SendStream interface {
// CancelWrite aborts sending on this stream.
// Data already written, but not yet delivered to the peer is not guaranteed to be delivered reliably.
// Write will unblock immediately, and future calls to Write will fail.
// When called multiple times or after closing the stream it is a no-op.
// When called multiple times it is a no-op.
// When called after Close, it aborts delivery. Note that there is no guarantee if
// the peer will receive the FIN or the reset first.
CancelWrite(StreamErrorCode)
// The Context is canceled as soon as the write-side of the stream is closed.
// This happens when Close() or CancelWrite() is called, or when the peer