Skip to content

Commit 44d3b0b

Browse files
committed
ipn: call refresh after resume
1 parent 2a77c19 commit 44d3b0b

6 files changed

Lines changed: 12 additions & 4 deletions

File tree

intra/ipn/exit64.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ func (h *exit64) Resume() bool {
232232
}
233233

234234
ok := h.status.Cas(st, TUP)
235+
go h.Refresh() // no-op since SkipRefresh
235236
log.I("proxy: exit64: resumed? %t", ok)
236237
return ok
237238
}

intra/ipn/http1.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ func (h *http1) Resume() bool {
231231
}
232232

233233
ok := h.status.Cas(st, TUP)
234+
go h.Refresh() // no-op since SkipRefresh
234235
log.I("proxy: http1: resumed? %t", ok)
235236
return ok
236237
}

intra/ipn/piph2.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ func (h *piph2) Resume() bool {
360360
}
361361

362362
ok := h.status.Cas(st, TUP)
363+
go h.Refresh() // no-op since SkipRefresh
363364
log.I("proxy: piph2: resumed? %t", ok)
364365
return ok
365366
}

intra/ipn/pipws.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,22 +267,22 @@ func (t *pipws) swapVia(new Proxy) Proxy {
267267
return swapVia(idstr(t), new, t.viaID, t.via)
268268
}
269269

270-
// ID implements Proxy.
270+
// ID implements x.Proxy.
271271
func (t *pipws) ID() *x.Gostr {
272272
return x.StrOf(RpnWs)
273273
}
274274

275-
// Type implements Proxy.
275+
// Type implements x.Proxy.
276276
func (t *pipws) Type() *x.Gostr {
277277
return x.StrOf(PIPWS)
278278
}
279279

280-
// GetAddr implements Proxy.
280+
// GetAddr implements x.Proxy.
281281
func (t *pipws) GetAddr() *x.Gostr {
282282
return x.StrOf(t.hostname + ":" + strconv.Itoa(t.port))
283283
}
284284

285-
// Router implements Proxy.
285+
// Router implements x.Proxy.
286286
func (t *pipws) Router() x.Router {
287287
return t
288288
}
@@ -320,6 +320,7 @@ func (h *pipws) Via() (x.Proxy, error) {
320320
return nil, errNoHop
321321
}
322322

323+
// Stop implements x.Proxy.
323324
func (t *pipws) Stop() error {
324325
t.status.Store(END)
325326
t.done()
@@ -358,6 +359,8 @@ func (h *pipws) Resume() bool {
358359
}
359360

360361
ok := h.status.Cas(st, TUP)
362+
go h.Refresh()
363+
361364
log.I("proxy: pipws: resumed? %t", ok)
362365
return ok
363366
}

intra/ipn/seproxy.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,7 @@ func (h *seproxy) Resume() bool {
482482
}
483483

484484
ok := h.status.Cas(st, TUP)
485+
go h.Refresh() // no-op since SkipRefresh
485486
log.I("proxy: se: resumed? %t", ok)
486487
return ok
487488
}

intra/ipn/socks5.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@ func (h *socks5) Resume() bool {
337337
}
338338

339339
ok := h.status.Cas(st, TUP)
340+
go h.Refresh() // no-op since SkipRefresh
340341
log.I("proxy: socks5: resumed? %t", ok)
341342
return ok
342343
}

0 commit comments

Comments
 (0)