mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-04-06 22:05:27 -04:00
generalized event handler
This commit is contained in:
@@ -34,7 +34,7 @@ func NewServer(ctx context.Context, config *ServerConfig) (*Server, error) {
|
||||
s := &Server{
|
||||
config: config,
|
||||
}
|
||||
space.OnInitialize(func() error {
|
||||
space.On(app.SpaceInitializing, func(interface{}) error {
|
||||
pm := policy.FromSpace(space)
|
||||
if pm == nil {
|
||||
return newError("Policy not found in space.")
|
||||
|
||||
Reference in New Issue
Block a user