MCPcopy Create free account
hub / github.com/imroc/req / closeReceive

Method closeReceive

internal/http3/state_tracking_stream.go:70–83  ·  view source on GitHub ↗
(e error)

Source from the content-addressed store, hash-verified

68}
69
70func (s *stateTrackingStream) closeReceive(e error) {
71 s.mx.Lock()
72 defer s.mx.Unlock()
73
74 // clear the stream the first time both the send
75 // and receive are finished
76 if s.recvErr == nil {
77 if s.sendErr != nil {
78 s.clearer.clearStream(s.StreamID())
79 }
80 s.recvErr = e
81 s.signalHasDatagram()
82 }
83}
84
85func (s *stateTrackingStream) Close() error {
86 s.closeSend(errors.New("write on closed stream"))

Callers 2

CancelReadMethod · 0.95
ReadMethod · 0.95

Calls 5

signalHasDatagramMethod · 0.95
LockMethod · 0.80
UnlockMethod · 0.80
clearStreamMethod · 0.65
StreamIDMethod · 0.65

Tested by

no test coverage detected