From cb25037813bdb6c95ffee03195342b6f2173473b Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Thu, 18 Jul 2024 18:58:25 +0800 Subject: [PATCH] fix(gRPC): create new context to avoid context cancel - Initialize a new background context in the `Send` function Signed-off-by: Bo-Yi Wu --- rpc/server.go | 1 + 1 file changed, 1 insertion(+) diff --git a/rpc/server.go b/rpc/server.go index 9c371ec4a..432a7b651 100644 --- a/rpc/server.go +++ b/rpc/server.go @@ -109,6 +109,7 @@ func (s *Server) Send(ctx context.Context, in *proto.NotificationRequest) (*prot } go func() { + ctx := context.Background() _, err := notify.SendNotification(ctx, ¬ification, s.cfg) if err != nil { logx.LogError.Error(err)