Audit fixes
This commit is contained in:
@@ -29,6 +29,8 @@ func (a *App) _signin(s *api.Session, w http.ResponseWriter, r *http.Request) er
|
||||
}
|
||||
|
||||
func (a *App) _signinSubmit(s *api.Session, w http.ResponseWriter, r *http.Request) error {
|
||||
// Ignoring error here - if host is the empty string, it will contend for the
|
||||
// lock anyway.
|
||||
host, _, _ := net.SplitHostPort(r.RemoteAddr)
|
||||
if !a.signInLock.TryLock(host) {
|
||||
time.Sleep(time.Second + time.Duration(rand.Int64N(int64(3*time.Second))))
|
||||
|
||||
@@ -26,6 +26,7 @@ func addRelayPeer(t *testing.T, a *App, vpnIP string, ep netip.AddrPort) *Peer {
|
||||
})
|
||||
p := a.peersByKey[key]
|
||||
p.wgPeer.LastHandshakeTime = time.Now()
|
||||
p.LastPing = time.Now()
|
||||
return p
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user