mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-01-07 20:46:10 +00:00
remove port closed
This commit is contained in:
parent
03ee9c7e3d
commit
f3ab58ea2e
@ -95,9 +95,10 @@ func (this *InboundDetourHandlerDynamic) refresh() error {
|
||||
|
||||
this.ich2Recycle, this.ichInUse = this.ichInUse, this.ich2Recycle
|
||||
for _, ich := range this.ichInUse {
|
||||
delete(this.portsInUse, ich.port)
|
||||
ich.handler.Close()
|
||||
ich.port = this.pickUnusedPort()
|
||||
err := retry.Timed(100 /* times */, 100 /* ms */).On(func() error {
|
||||
ich.handler.Close()
|
||||
err := ich.handler.Listen(ich.port)
|
||||
if err != nil {
|
||||
log.Error("Point: Failed to start inbound detour on port ", ich.port, ": ", err)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user