修改事件处理机制

This commit is contained in:
duanhf2012
2020-04-08 20:54:59 +08:00
parent a0b02c7ec2
commit 4445b583fb
2 changed files with 21 additions and 9 deletions

View File

@@ -2,7 +2,6 @@ package service
import (
"fmt"
"github.com/duanhf2012/origin/event"
"github.com/duanhf2012/origin/log"
"github.com/duanhf2012/origin/profiler"
"github.com/duanhf2012/origin/rpc"
@@ -130,7 +129,7 @@ func (slf *Service) Run() {
if slf.profiler!=nil {
analyzer = slf.profiler.Push(fmt.Sprintf("Event_%d", int(ev.Type)))
}
slf.EventHandler(slf.this.(event.IEventProcessor),ev)
slf.EventHandler(ev)
if analyzer!=nil {
analyzer.Pop()
analyzer = nil