Browse Source

Fix external controller crash before started

世界 1 year ago
parent
commit
46be319976
1 changed files with 3 additions and 0 deletions
  1. 3 0
      route/router.go

+ 3 - 0
route/router.go

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