Closed rieske closed 5 years ago
It is because of how the equals function of gRPC status works. It is a bug. We should actually check like this if (status.getCode() != Status.CANCELLED.getCode()) {
Was just about to write the same :)
Replicated in a test and it is due to the description in status object failing the equals check.
.getCode()
does the trick.
That would explain why we're still logging this even after I thought I fixed it :)
@rieske If you have this fixed /w a test case a PR would be much appreciated
DiscoveryServer is logging ERROR when client Envoy closes connection.
I have an Envoy connected to my java-control-plane implementation and whenever I restart Envoy, the control plane logs an ERROR from
io.envoyproxy.controlplane.server.DiscoveryServer
Strange thing is that the code here: https://github.com/envoyproxy/java-control-plane/blob/master/server/src/main/java/io/envoyproxy/controlplane/server/DiscoveryServer.java#L224-L226 says that it should log ERROR if the status is other than CANCELLED, however in my case, the stack trace says:
and the message is
[3] stream closed with error
together with logger_nameio.envoyproxy.controlplane.server.DiscoveryServer
, indicating that the log line must be coming from the Discovery server there.