reset remote tracer stream on errors

This commit is contained in:
vyzo 2019-11-18 17:33:53 +02:00
parent abe4763c01
commit cce30a4d6a
1 changed files with 7 additions and 2 deletions

View File

@ -214,12 +214,17 @@ func (t *RemoteTracer) doWrite() {
end: end:
if !ok { if !ok {
if err != nil {
s.Reset()
} else {
gzipW.Close() gzipW.Close()
helpers.FullClose(s) helpers.FullClose(s)
}
return return
} }
if err != nil { if err != nil {
s.Reset()
s, err = t.openStream() s, err = t.openStream()
if err != nil { if err != nil {
log.Errorf("error opening remote tracer stream: %s", err.Error()) log.Errorf("error opening remote tracer stream: %s", err.Error())