Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
9b300608f6
@ -38,6 +38,10 @@ func (this *apiComp) Info(session comm.IUserSession, req *pb.BuriedInfoReq) (err
|
||||
for _, items := range buried.Items {
|
||||
for _, v := range items.Condi {
|
||||
if conf, err = this.module.configure.getburiedcondidata(v.Conid); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
conditions = append(conditions, comm.GetBuriedConIProgress(conf, v))
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
"go_dreamfactory/lego/base"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/core/cbase"
|
||||
"runtime"
|
||||
"time"
|
||||
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
@ -983,6 +984,14 @@ func (this *ModuleBase) FormatRes(res []*cfg.Gameatn) (ret []*cfg.Gameatn) {
|
||||
|
||||
//异步调用用户处理流
|
||||
func (this *ModuleBase) AsynHandleSession(session comm.IUserSession, handle func(session comm.IUserSession)) {
|
||||
defer func() { //程序异常 收集异常信息传递给前端显示
|
||||
if r := recover(); r != nil {
|
||||
buf := make([]byte, 4096)
|
||||
l := runtime.Stack(buf, false)
|
||||
err := fmt.Errorf("%v: %s", r, buf[:l])
|
||||
log.Errorf("[AsynHandleSession] err:%s", err.Error())
|
||||
}
|
||||
}()
|
||||
handle(session)
|
||||
session.Push()
|
||||
this.PutUserSession(session)
|
||||
|
Loading…
Reference in New Issue
Block a user