Fix URLTest outbound
This commit is contained in:
@@ -88,6 +88,7 @@ type Router struct {
|
||||
platformInterface platform.Interface
|
||||
needWIFIState bool
|
||||
wifiState adapter.WIFIState
|
||||
started bool
|
||||
}
|
||||
|
||||
func NewRouter(
|
||||
@@ -571,6 +572,11 @@ func (r *Router) Close() error {
|
||||
return err
|
||||
}
|
||||
|
||||
func (r *Router) PostStart() error {
|
||||
r.started = true
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r *Router) Outbound(tag string) (adapter.Outbound, bool) {
|
||||
outbound, loaded := r.outboundByTag[tag]
|
||||
return outbound, loaded
|
||||
@@ -1015,8 +1021,11 @@ func (r *Router) notifyNetworkUpdate(event int) {
|
||||
}
|
||||
}
|
||||
|
||||
r.ResetNetwork()
|
||||
return
|
||||
if !r.started {
|
||||
return
|
||||
}
|
||||
|
||||
_ = r.ResetNetwork()
|
||||
}
|
||||
|
||||
func (r *Router) ResetNetwork() error {
|
||||
|
||||
Reference in New Issue
Block a user