mirror of
https://github.com/LBRYFoundation/tracker.git
synced 2025-08-23 17:47:29 +00:00
parent
a0bcc07893
commit
dfbf4a6fad
1 changed files with 4 additions and 0 deletions
|
@ -33,6 +33,10 @@ func handleError(err error) (int, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Server) check(w http.ResponseWriter, r *http.Request, p httprouter.Params) (int, error) {
|
func (s *Server) check(w http.ResponseWriter, r *http.Request, p httprouter.Params) (int, error) {
|
||||||
|
// Ping the backend if private tracker is enabled.
|
||||||
|
if err := s.tracker.Backend.Ping(); s.config.PrivateEnabled && err != nil {
|
||||||
|
return handleError(err)
|
||||||
|
}
|
||||||
_, err := w.Write([]byte("STILL-ALIVE"))
|
_, err := w.Write([]byte("STILL-ALIVE"))
|
||||||
return handleError(err)
|
return handleError(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue