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