diff --git a/modules/island/api_upgrade.go b/modules/island/api_upgrade.go index 6a0206cf2..c47b9f55f 100644 --- a/modules/island/api_upgrade.go +++ b/modules/island/api_upgrade.go @@ -75,7 +75,7 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.IsLandUpgradeReq this.module.model.Change(session.GetUserId(), map[string]interface{}{ "nodes": info.Nodes, }) - session.SendMsg(string(this.module.GetType()), "upgrade", &pb.IsLandUpgradeReq{Nid: conf.NodeId}) + session.SendMsg(string(this.module.GetType()), "upgrade", &pb.IsLandUpgradeResp{Nid: conf.NodeId, Lv: info.Nodes[conf.NodeId]}) go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "IsLandUpgradeReq", conf.CostItem) }) diff --git a/modules/wtask/module.go b/modules/wtask/module.go index e1d7b3f80..50b45e14e 100644 --- a/modules/wtask/module.go +++ b/modules/wtask/module.go @@ -169,6 +169,10 @@ func (this *WTask) OpenCmdNotice(session comm.IUserSession, keys ...string) { break } } + if !ok { + return + } + if user, err = this.ModuleUser.GetUser(session.GetUserId()); err != nil { this.Error("获取用户信息失败!", log.Field{Key: "uid", Value: session.GetUserId()}) return