From 06ba9775ee54ed016af1d72914220fd8ea2d54da Mon Sep 17 00:00:00 2001 From: "Chris S. Kim" Date: Mon, 22 Aug 2022 13:18:59 -0400 Subject: [PATCH] Remove check for ResponseNonce --- .../grpc-external/services/peerstream/stream_resources.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/agent/grpc-external/services/peerstream/stream_resources.go b/agent/grpc-external/services/peerstream/stream_resources.go index 21e5c1fb9a..deb7fcc07c 100644 --- a/agent/grpc-external/services/peerstream/stream_resources.go +++ b/agent/grpc-external/services/peerstream/stream_resources.go @@ -557,14 +557,11 @@ func (s *Server) realHandleStream(streamReq HandleStreamRequest) error { // At this point we have a valid ResourceURL and we are subscribed to it. switch { - case req.ResponseNonce == "" && req.Error != nil: - return grpcstatus.Error(codes.InvalidArgument, "initial subscription request for a resource type must not contain an error") - - case req.ResponseNonce != "" && req.Error == nil: // ACK + case req.Error == nil: // ACK // TODO(peering): handle ACK fully status.TrackAck() - case req.ResponseNonce != "" && req.Error != nil: // NACK + case req.Error != nil: // NACK // TODO(peering): handle NACK fully logger.Warn("client peer was unable to apply resource", "code", req.Error.Code, "error", req.Error.Message) status.TrackNack(fmt.Sprintf("client peer was unable to apply resource: %s", req.Error.Message))