report errors from log streaming (#1828)

This commit is contained in:
Dominic Wong
2020-07-13 17:35:23 +01:00
committed by GitHub
parent 07fbb06ed8
commit 7c5e3b0f30
3 changed files with 6 additions and 2 deletions

View File

@@ -2,6 +2,7 @@ package service
import (
"context"
"io"
"sync"
"github.com/micro/go-micro/v2/client"
@@ -121,6 +122,9 @@ func (s *svc) Logs(service *runtime.Service, opts ...runtime.LogsOption) (runtim
record := pb.LogRecord{}
err := ls.RecvMsg(&record)
if err != nil {
if err != io.EOF {
logStream.err = err
}
logStream.Stop()
return
}