From 6ded8b14b391046edf14dfea2acbf1e6ce55227a Mon Sep 17 00:00:00 2001 From: gfanton <8671905+gfanton@users.noreply.github.com> Date: Thu, 16 Mar 2023 16:15:45 +0100 Subject: [PATCH] fix: remove panic on grpc close error Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com> --- service_client.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/service_client.go b/service_client.go index d70cbf82..def725b9 100644 --- a/service_client.go +++ b/service_client.go @@ -148,11 +148,8 @@ func NewClientFromService(ctx context.Context, s *grpc.Server, svc Service, opts protocoltypes.RegisterProtocolServiceServer(s, svc) go func() { - switch err := s.Serve(bl); err { - case nil, grpc.ErrServerStopped: // ok - default: - panic(err) - } + // we dont need to log the error + _ = s.Serve(bl) }() return &client{