1
This commit is contained in:
parent
73e720ae91
commit
99e7d0f59b
@ -85,6 +85,10 @@ func (this *HttpServer) dispatchRequest(c *Context) {
|
|||||||
atomic.CompareAndSwapInt64(&this.maxHandleTime, oldVal, endTick - beginTick)
|
atomic.CompareAndSwapInt64(&this.maxHandleTime, oldVal, endTick - beginTick)
|
||||||
}
|
}
|
||||||
atomic.AddInt64(&this.okTimes, 1)
|
atomic.AddInt64(&this.okTimes, 1)
|
||||||
|
if err := recover(); err != nil {
|
||||||
|
SysLog().Error("handle name:%s error:%s", handleName, err)
|
||||||
|
c.Response(`{"errcode":500, "errmsg":"服务器内部错误"}`)
|
||||||
|
}
|
||||||
}()
|
}()
|
||||||
handle(c)
|
handle(c)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user