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.
()
| 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. |
| 157 | func (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 |
| 170 | func (sm *StreamManager) ClientDisconnected() { |