fix some misc crap
parent
9c147d1b79
commit
b102e17f72
|
|
@ -3,6 +3,7 @@ package internal
|
|||
import (
|
||||
"log"
|
||||
"net/http"
|
||||
"runtime"
|
||||
"time"
|
||||
|
||||
"github.com/go-chi/chi/v5"
|
||||
|
|
@ -94,7 +95,7 @@ func (a *adminHandler) signal(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
defer c.Close()
|
||||
for {
|
||||
|
||||
runtime.Gosched()
|
||||
// send any updates that come through to the client
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ func (a *adminHandler) getStats(r *http.Request) (*RestResponse, error) {
|
|||
|
||||
if intervalSecondsStr != "" {
|
||||
if lai.IntervalSeconds, err = strconv.Atoi(intervalSecondsStr); err != nil {
|
||||
return BasicResponse(false, "interval query param must be a valid whole number"), nil
|
||||
return BasicResponse(false, "interval query param must be a valid whole number greater than zero"), nil
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -399,7 +399,7 @@ func (ss *Sqlite) Log(ql QueryLog) error {
|
|||
(?, ?, ?, ?, ?, ?, ?, ?, ?);
|
||||
`
|
||||
if _, err := ss.DB.Exec(sql,
|
||||
ql.Started.Format(ISO8601),
|
||||
ql.Started.UTC().Format(ISO8601),
|
||||
ql.ClientIP,
|
||||
ql.Protocol,
|
||||
ql.Domain,
|
||||
|
|
|
|||
Loading…
Reference in New Issue