允许单个账号在同一个IP登录多个客户端

This commit is contained in:
GoEdgeLab
2024-05-03 12:09:27 +08:00
parent a38ea6d778
commit 466107553e
2 changed files with 16 additions and 4 deletions

View File

@@ -73,7 +73,7 @@ func (this *SessionManager) Read(sid string) map[string]string {
func (this *SessionManager) WriteItem(sid string, key string, value string) bool {
// 删除缓存
defer ttlcache.DefaultCache.Delete( "SESSION@" + sid)
defer ttlcache.DefaultCache.Delete("SESSION@" + sid)
// 忽略OTP
if strings.HasSuffix(sid, "_otp") {
@@ -99,7 +99,7 @@ func (this *SessionManager) WriteItem(sid string, key string, value string) bool
func (this *SessionManager) Delete(sid string) bool {
// 删除缓存
defer ttlcache.DefaultCache.Delete( "SESSION@" + sid)
defer ttlcache.DefaultCache.Delete("SESSION@" + sid)
// 忽略OTP
if strings.HasSuffix(sid, "_otp") {