diff --git a/internal/group/group.handler.go b/internal/group/group.handler.go index f50ce6f..855b98c 100644 --- a/internal/group/group.handler.go +++ b/internal/group/group.handler.go @@ -339,6 +339,9 @@ func (h *handlerImpl) checkRegTime() bool { if nowGMTPlus7.Before(h.regConf.RpkmStart) { h.log.Named("checkRegTime").Warn("Forbidden: Registration hasn't started") return false + } else if nowGMTPlus7.After(h.regConf.RpkmEnd) { + h.log.Named("checkRegTime").Warn("Forbidden: Registration has ended") + return false } return true diff --git a/internal/selection/selection.handler.go b/internal/selection/selection.handler.go index a3a7f13..361f949 100644 --- a/internal/selection/selection.handler.go +++ b/internal/selection/selection.handler.go @@ -283,6 +283,9 @@ func (h *handlerImpl) checkRegTime() bool { if nowGMTPlus7.Before(h.regConf.RpkmStart) { h.log.Named("checkRegTime").Warn("Forbidden: Registration hasn't started") return false + } else if nowGMTPlus7.After(h.regConf.RpkmEnd) { + h.log.Named("checkRegTime").Warn("Forbidden: Registration has ended") + return false } return true