V2bX/limiter/clear.go

17 lines
337 B
Go
Raw Normal View History

package limiter
2023-06-29 23:07:27 -04:00
import log "github.com/sirupsen/logrus"
func ClearOnlineIP() error {
2023-06-29 23:07:27 -04:00
log.WithField("Type", "Limiter").
Debug("Clear online ip...")
limitLock.RLock()
for _, l := range limiter {
l.ConnLimiter.ClearOnlineIP()
}
limitLock.RUnlock()
2023-06-29 23:07:27 -04:00
log.WithField("Type", "Limiter").
Debug("Clear online ip done")
return nil
}