We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
func (manager *Manager) GC() { manager.lock.Lock() defer manager.lock.Unlock() time.AfterFunc(time.Duration(manager.maxLifeTime), func() { manager.provider.SessionGC(manager.maxLifeTime) }) }
time.AfterFunc第一个时间参数的单位是纳秒,根据上下文信息,这里是否应该乘上time.Second,如下所示
time.AfterFunc
time.Second
func (manager *Manager) GC() { manager.lock.Lock() defer manager.lock.Unlock() time.AfterFunc(time.Duration(manager.maxLifeTime)*time.Second, func() { manager.provider.SessionGC(manager.maxLifeTime) }) }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
time.AfterFunc
第一个时间参数的单位是纳秒,根据上下文信息,这里是否应该乘上time.Second
,如下所示The text was updated successfully, but these errors were encountered: