fix: 修复启动顺序。

main v1.2.4
NoahLan 1 year ago
parent 70f6cadbb6
commit cfa0409cc5

@ -44,16 +44,16 @@ func NewEngine(conf config.EngineConf, opts ...RunOption) *Engine {
}, },
} }
for _, opt := range opts {
opt(ngin)
}
if ngin.pool == nil { if ngin.pool == nil {
ngin.pool, _ = ants.NewPool(math.MaxInt32) ngin.pool, _ = ants.NewPool(math.MaxInt32)
} }
ngin.evtMgr = event.NewEventManager(ngin.pool) ngin.evtMgr = event.NewEventManager(ngin.pool)
for _, opt := range opts {
opt(ngin)
}
return ngin return ngin
} }

Loading…
Cancel
Save