Fix external controller crash before started

This commit is contained in:
世界 2024-02-07 13:52:04 +08:00
parent b27bc45cf2
commit 46be319976
No known key found for this signature in database
GPG key ID: CD109927C34A63C4

View file

@ -415,6 +415,9 @@ func (r *Router) Initialize(inbounds []adapter.Inbound, outbounds []adapter.Outb
} }
func (r *Router) Outbounds() []adapter.Outbound { func (r *Router) Outbounds() []adapter.Outbound {
if !r.started {
return nil
}
return r.outbounds return r.outbounds
} }