MCPcopy Create free account
hub / github.com/wavetermdev/waveterm / GetStreamDoneInfo

Method GetStreamDoneInfo

pkg/jobmanager/streammanager.go:157–167  ·  view source on GitHub ↗

GetStreamDoneInfo returns whether the stream is done and the error if there was one. The error is only meaningful if done=true, as the error is delivered as part of the stream otherwise.

()

Source from the content-addressed store, hash-verified

155// GetStreamDoneInfo returns whether the stream is done and the error if there was one.
156// The error is only meaningful if done=true, as the error is delivered as part of the stream otherwise.
157func (sm *StreamManager) GetStreamDoneInfo() (done bool, streamError string) {
158 sm.lock.Lock()
159 defer sm.lock.Unlock()
160 if !sm.terminalEventAcked {
161 return false, ""
162 }
163 if sm.terminalEvent != nil && !sm.terminalEvent.isEof {
164 return true, sm.terminalEvent.err
165 }
166 return true, ""
167}
168
169// ClientDisconnected transitions to DISCONNECTED mode
170func (sm *StreamManager) ClientDisconnected() {

Callers 1

PrepareConnectMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected