fix(weixin_ilink): 换码阈值5s->60s——码未过期一律复用,防前端高频login-qr砍确认会话
This commit is contained in:
1 parent
851c8a31ce
commit
8d44bba14a
2 files changed
+12
-7
No files matched your search
@@ -75,7 +75,7 @@ func TestStartLogin_ScanedPastWindowReusesQR(t *testing.T) {
|
||||
// could keep the QR. Then a refresh must still reuse it.
|
||||
ad.loginMu.Lock()
|
||||
if ad.loginSession != nil {
|
||||
ad.loginSession.startedAt = time.Now().Add(-(qrReuseWindow + time.Second))
|
||||
ad.loginSession.startedAt = time.Now().Add(-(60*time.Second + time.Second))
|
||||
}
|
||||
ad.loginMu.Unlock()
|
||||
|
||||
@@ -128,7 +128,7 @@ func TestStartLogin_WaitingPastWindowReMints(t *testing.T) {
|
||||
|
||||
ad.loginMu.Lock()
|
||||
if ad.loginSession != nil {
|
||||
ad.loginSession.startedAt = time.Now().Add(-(qrReuseWindow + time.Second))
|
||||
ad.loginSession.startedAt = time.Now().Add(-(60*time.Second + time.Second))
|
||||
}
|
||||
ad.loginMu.Unlock()
|
||||
|
||||
|
||||
Reference in new issue
Block a user