mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-10-14 18:13:58 +00:00
Fix crash when interface monitor is unavailable
This commit is contained in:
@@ -99,7 +99,11 @@ func (h *Outbound) Start(stage adapter.StartStage) error {
|
||||
}
|
||||
|
||||
func (h *Outbound) fetchMyAddresses() {
|
||||
myInterfaceNames := h.network.InterfaceMonitor().MyInterfaces()
|
||||
interfaceMonitor := h.network.InterfaceMonitor()
|
||||
if interfaceMonitor == nil {
|
||||
return
|
||||
}
|
||||
myInterfaceNames := interfaceMonitor.MyInterfaces()
|
||||
if len(myInterfaceNames) == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user