Skip to content

Commit

Permalink
nilaway: ipn/proxies, ipn/warp
Browse files Browse the repository at this point in the history
  • Loading branch information
ignoramous committed Jan 23, 2025
1 parent e86a307 commit cbc4a85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions intra/ipn/proxies.go
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ func (px *proxifier) registerAmnezia(existingStateJson []byte) (stateJson []byte
}

if id == nil {
err = errNilAmzId
return nil, errNilAmzId
}

if err != nil {
Expand Down Expand Up @@ -979,7 +979,7 @@ func (px *proxifier) RegisterProton(existingStateJson []byte) (stateJson []byte,
p, err = px.extc.MakeProtonWg(nostore)
}
if p == nil {
err = errNilProtonCfg
return nil, errNilProtonCfg
}
if err != nil {
log.E("proxy: proton: make (restore? %t) failed: %v", restore, err)
Expand Down
3 changes: 2 additions & 1 deletion intra/ipn/warp/proton.go
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,8 @@ func (a *ProtonClient) rereg(force bool) error {
}

now := time.Now().Unix()
fresh := a.config.CertRefreshTime-now > 0
// redundant nilcheck for nilaway
fresh := a.config != nil && a.config.CertRefreshTime-now > 0

log.I("proton: re-reg %s (exp? %t, force? %t)",
a.cert.SerialNumber, !fresh, force)
Expand Down

0 comments on commit cbc4a85

Please sign in to comment.