优化recover

This commit is contained in:
duanhf2012
2020-04-01 21:08:23 +08:00
parent 7fdfbb587e
commit 269a999b58
4 changed files with 26 additions and 15 deletions

View File

@@ -85,7 +85,7 @@ func (slf *EventProcessor) GetEventReciver() IEventProcessor{
func (slf *EventProcessor) EventHandler(processor IEventProcessor,ev *Event) {
defer func() {
if r := recover(); r != nil {
buf := make([]byte, 40960)
buf := make([]byte, 4096)
l := runtime.Stack(buf, false)
err := fmt.Errorf("%v: %s", r, buf[:l])
log.Error("core dump info:%+v\n",err)