mirror of
https://github.com/seriousm4x/UpSnap.git
synced 2026-08-03 10:58:44 -04:00
reset timeout
This commit is contained in:
@@ -38,7 +38,7 @@ func RunPing(app *pocketbase.PocketBase) {
|
||||
for _, device := range Devices {
|
||||
// ping
|
||||
go func(device *models.Record) {
|
||||
oldStatus := device.Get("status")
|
||||
oldStatus := device.GetString("status")
|
||||
newStatus := networking.PingDevice(device)
|
||||
if newStatus {
|
||||
if oldStatus == "offline" || oldStatus == "" {
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
}
|
||||
|
||||
function countdown() {
|
||||
timeout = 120;
|
||||
clearInterval(interval);
|
||||
const end = Date.parse(device.updated) + 2 * 60 * 1000;
|
||||
interval = setInterval(() => {
|
||||
|
||||
Reference in New Issue
Block a user