Recv next message after send returns EOF (#7872)
This commit is contained in:
parent
5efce718e1
commit
b9a71880d7
|
|
@ -217,7 +217,11 @@ func (c *GNMI) subscribeGNMI(ctx context.Context, address string, tlscfg *tls.Co
|
||||||
}
|
}
|
||||||
|
|
||||||
if err = subscribeClient.Send(request); err != nil {
|
if err = subscribeClient.Send(request); err != nil {
|
||||||
return fmt.Errorf("failed to send subscription request: %v", err)
|
// If io.EOF is returned, the stream may have ended and stream status
|
||||||
|
// can be determined by calling Recv.
|
||||||
|
if err != io.EOF {
|
||||||
|
return fmt.Errorf("failed to send subscription request: %v", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
c.Log.Debugf("Connection to gNMI device %s established", address)
|
c.Log.Debugf("Connection to gNMI device %s established", address)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue