diff --git a/pkg/agent/agent.go b/pkg/agent/agent.go index f90a0c8..468109c 100644 --- a/pkg/agent/agent.go +++ b/pkg/agent/agent.go @@ -6,6 +6,7 @@ import ( "os" "strconv" "strings" + _ "net/http/pprof" "github.com/LilithGames/agent-go/tools/metric" "github.com/spf13/viper" diff --git a/pkg/agent/tick.go b/pkg/agent/tick.go index edc4e7f..697d3aa 100644 --- a/pkg/agent/tick.go +++ b/pkg/agent/tick.go @@ -2,6 +2,7 @@ package agent import ( "context" + "log" "strconv" "sync" "sync/atomic" @@ -146,6 +147,7 @@ func (t *Tick) Tear(ticker core.Ticker) { tick.ctx = t.ctx tick.statPID = t.statPID tick.actorRootContext = t.actorRootContext + tick.alert = t.alert t.Tick.Tear(&tick.Tick) } @@ -183,6 +185,7 @@ func (t *Tick) SendAlertMsg(msg *ErrMsg) error { if t.alert != nil { return t.alert.SendMsg(msg) } + log.Println("alert object is nil...") return nil }