From 5461f99b4e4dc133d6fabce9cd0dc6a4ca7c12da Mon Sep 17 00:00:00 2001 From: rohrerj <26304001+rohrerj@users.noreply.github.com> Date: Wed, 6 Dec 2023 22:44:54 +0100 Subject: [PATCH] bugfix --- daemon/internal/servers/grpc.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/daemon/internal/servers/grpc.go b/daemon/internal/servers/grpc.go index b9e7af48fe..dd2cb43bc7 100644 --- a/daemon/internal/servers/grpc.go +++ b/daemon/internal/servers/grpc.go @@ -356,6 +356,9 @@ func (s *DaemonServer) DRKeyASHost( req *pb_daemon.DRKeyASHostRequest, ) (*pb_daemon.DRKeyASHostResponse, error) { + if s.DRKeyClient == nil { + return nil, serrors.New("DRKey is not available") + } meta, err := requestToASHostMeta(req) if err != nil { return nil, serrors.WrapStr("parsing protobuf ASHostReq", err) @@ -378,6 +381,9 @@ func (s *DaemonServer) DRKeyHostAS( req *pb_daemon.DRKeyHostASRequest, ) (*pb_daemon.DRKeyHostASResponse, error) { + if s.DRKeyClient == nil { + return nil, serrors.New("DRKey is not available") + } meta, err := requestToHostASMeta(req) if err != nil { return nil, serrors.WrapStr("parsing protobuf HostASReq", err) @@ -400,6 +406,9 @@ func (s *DaemonServer) DRKeyHostHost( req *pb_daemon.DRKeyHostHostRequest, ) (*pb_daemon.DRKeyHostHostResponse, error) { + if s.DRKeyClient == nil { + return nil, serrors.New("DRKey is not available") + } meta, err := requestToHostHostMeta(req) if err != nil { return nil, serrors.WrapStr("parsing protobuf HostHostReq", err)