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 {