Skip to content

Commit 493c4af

Browse files
committed
lint: ipn/wgproxy.go
1 parent 58bde03 commit 493c4af

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

intra/ipn/wgproxy.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1433,7 +1433,7 @@ func (h *wgtun) serve(network, local string) (pc net.PacketConn, err error) {
14331433
func (h *wgtun) listener(op wg.PktDir, err error) {
14341434
s := h.status.Load()
14351435
if s == END || s == TPU { // stopped or paused
1436-
log.E("wg: %s listener: %s; status %s; ignoring", h.tag(), op, pxstatus(s))
1436+
log.E("wg: %s listener: %s; status %s; ignoring1", h.tag(), op, pxstatus(s))
14371437
return
14381438
}
14391439

@@ -1444,7 +1444,7 @@ func (h *wgtun) listener(op wg.PktDir, err error) {
14441444
defer func() {
14451445
cur := h.status.Load()
14461446
if cur == END || cur == TPU { // stopped or paused
1447-
log.E("wg: %s listener: %s; status %s; ignoring", h.tag(), op, pxstatus(s))
1447+
log.E("wg: %s listener: %s; status %s; ignoring2", h.tag(), op, pxstatus(s))
14481448
return
14491449
}
14501450
h.status.Cas(cur, s)
@@ -1479,9 +1479,10 @@ func (h *wgtun) listener(op wg.PktDir, err error) {
14791479
}
14801480

14811481
if s != TOK {
1482-
if op == wg.Rcv {
1482+
switch op {
1483+
case wg.Rcv:
14831484
h.errRx.Add(1)
1484-
} else if op == wg.Snd {
1485+
case wg.Snd:
14851486
h.errTx.Add(1)
14861487
}
14871488
}

0 commit comments

Comments
 (0)