mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #3703 from zexi/hotfix/webconsole-spice
webconsole: skip spice access interval check
This commit is contained in:
@@ -84,8 +84,9 @@ func (man *SSessionManager) Get(accessToken string) (*SSession, bool) {
|
||||
return nil, false
|
||||
}
|
||||
s := obj.(*SSession)
|
||||
if time.Since(s.AccessedAt) < AccessInterval {
|
||||
log.Warningf("Token: %s, Session: %s can't be accessed during %s, last accessed at: %s", accessToken, s.Id, AccessInterval, s.AccessedAt)
|
||||
protocol := s.GetProtocol()
|
||||
if protocol != SPICE && time.Since(s.AccessedAt) < AccessInterval {
|
||||
log.Warningf("Protol: %q, Token: %s, Session: %s can't be accessed during %s, last accessed at: %s", s.GetProtocol(), accessToken, s.Id, AccessInterval, s.AccessedAt)
|
||||
return nil, false
|
||||
}
|
||||
s.AccessedAt = time.Now()
|
||||
|
||||
Reference in New Issue
Block a user