Fix terminate not returning early

pull/14285/head
Chris S. Kim 2022-09-02 11:44:38 -04:00
parent 560d410c6d
commit d1d9dbff8e
1 changed files with 3 additions and 4 deletions

View File

@ -170,10 +170,9 @@ func (s *Server) StreamResources(stream pbpeerstream.PeerStreamService_StreamRes
}
logTraceSend(logger, term)
err := stream.Send(term)
if err != nil {
return grpcstatus.Error(codes.FailedPrecondition, "peering is marked as deleted: "+req.PeerID)
}
// we don't care if send fails; stream will be killed by termination message or grpc error
_ = stream.Send(term)
return grpcstatus.Error(codes.FailedPrecondition, "peering is marked as deleted: "+req.PeerID)
}
secrets, err := s.GetStore().PeeringSecretsRead(nil, req.PeerID)