login-validator: Fix not reloading issue

This commit is contained in:
nemunaire 2023-02-20 17:53:25 +01:00
parent 0bceec2023
commit afed114190
1 changed files with 3 additions and 1 deletions

View File

@ -100,7 +100,7 @@ func main() {
log.Println("Registering handlers...")
mux := http.NewServeMux()
mux.Handle("/login", lc)
mux.Handle("/login", &lc)
mux.HandleFunc("/logout", logout)
mux.HandleFunc("/passwd", passwd)
http.HandleFunc("/", mux.ServeHTTP)
@ -119,6 +119,8 @@ mloop:
log.Println("Reloading students files...")
if lc.students, err = readStudentsList(studentsFile); err != nil {
log.Println("Error during students.csv reload:", err)
} else {
log.Printf("Students reloaded: %d students allowed to login", len(lc.students))
}
case syscall.SIGTERM, syscall.SIGINT:
break mloop