mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-21 16:11:32 +00:00
Fix dhcp reset
This commit is contained in:
parent
a7b37c5953
commit
40a0b69918
|
@ -87,9 +87,15 @@ func (t *Transport) Start() error {
|
|||
}
|
||||
|
||||
func (t *Transport) Reset() {
|
||||
for _, transport := range t.transports {
|
||||
transport.Reset()
|
||||
}
|
||||
}
|
||||
|
||||
func (t *Transport) Close() error {
|
||||
for _, transport := range t.transports {
|
||||
transport.Close()
|
||||
}
|
||||
if t.interfaceCallback != nil {
|
||||
t.router.InterfaceMonitor().UnregisterCallback(t.interfaceCallback)
|
||||
}
|
||||
|
@ -266,6 +272,9 @@ func (t *Transport) recreateServers(iface *net.Interface, serverAddrs []netip.Ad
|
|||
}
|
||||
transports = append(transports, serverTransport)
|
||||
}
|
||||
for _, transport := range t.transports {
|
||||
transport.Close()
|
||||
}
|
||||
t.transports = transports
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue