mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-10-26 13:06:56 +00:00
Handle network update callbacks in background
This commit is contained in:
@@ -77,7 +77,7 @@ func (i *Inbound) Start(stage adapter.StartStage) error {
|
||||
return i.listener.Start()
|
||||
}
|
||||
|
||||
func (i *Inbound) InterfaceUpdated() {
|
||||
func (i *Inbound) InterfaceUpdated(ctx context.Context) {
|
||||
i.udpNat.Purge()
|
||||
}
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ func (h *Outbound) fetchMyAddresses() {
|
||||
h.myAddresses.Store(myAddresses)
|
||||
}
|
||||
|
||||
func (h *Outbound) InterfaceUpdated() {
|
||||
func (h *Outbound) InterfaceUpdated(ctx context.Context) {
|
||||
h.fetchMyAddresses()
|
||||
if h.icmpPort != nil {
|
||||
h.icmpPort.Close()
|
||||
|
||||
Reference in New Issue
Block a user