client: fix potentially dropped streaming errors

This commit is contained in:
Michael Schurter 2018-09-25 13:43:58 -07:00
parent 4b44b9039b
commit 9a7e6be2b6
1 changed files with 9 additions and 0 deletions

View File

@ -276,6 +276,15 @@ OUTER:
break OUTER
case frame, ok := <-frames:
if !ok {
// frame may have been closed when an error
// occurred. Check once more for an error.
select {
case streamErr = <-errCh:
// There was a pending error!
default:
// No error, continue on
}
break OUTER
}