From bc5251473a2e676a154575b053361c8d0501ad5a Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Mon, 9 Oct 2023 17:25:00 +0800 Subject: [PATCH] =?UTF-8?q?=E9=82=AE=E4=BB=B6RPC=20=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/mail/module.go | 2 +- modules/web/api_creatmail.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/mail/module.go b/modules/mail/module.go index 9a411ed4c..c3cc45c59 100644 --- a/modules/mail/module.go +++ b/modules/mail/module.go @@ -140,7 +140,7 @@ func (this *Mail) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (red return } -func (this *Mail) Rpc_Mail(ctx context.Context, args *pb.DBMailData) (err error) { +func (this *Mail) Rpc_Mail(ctx context.Context, args *pb.DBMailData, reply *pb.EmptyResp) (err error) { this.Debug("Rpc_Mail", log.Field{Key: "args", Value: args.String()}) var ( conn *db.DBConn diff --git a/modules/web/api_creatmail.go b/modules/web/api_creatmail.go index 0e448bac0..de9953160 100644 --- a/modules/web/api_creatmail.go +++ b/modules/web/api_creatmail.go @@ -73,9 +73,9 @@ func (this *Api_Comp) CreateMail(c *engine.Context) { if len(req.Items) > 0 { mail.Reward = true } - + ctr, _ := context.WithTimeout(context.Background(), time.Second*5) if _, err = this.module.service.RpcGo( - context.Background(), + ctr, comm.Service_Worker, string(comm.Rpc_Mail), mail, nil); err != nil {