MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / Close

Method Close

pkg/streamclient/streamreader.go:195–214  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

193}
194
195func (r *Reader) Close() error {
196 r.lock.Lock()
197 defer r.lock.Unlock()
198
199 if r.closed {
200 if r.err != nil {
201 return r.err
202 }
203 return io.ErrClosedPipe
204 }
205
206 r.closed = true
207 if r.err == nil {
208 r.err = io.ErrClosedPipe
209 }
210 r.cond.Broadcast()
211 r.sendAckLocked(false, true, "")
212
213 return r.err
214}

Callers 1

TestCancelFunction · 0.95

Calls 1

sendAckLockedMethod · 0.95

Tested by 1

TestCancelFunction · 0.76