From 447db3e87e7204f021dc1f0d51a190c991b90999 Mon Sep 17 00:00:00 2001 From: Nathaniel Wesley Filardo Date: Thu, 26 Dec 2019 00:39:16 +0000 Subject: [PATCH] pcall sntp to dodge panics Since sntp is mostly an autonomic thing, it's perhaps fine to drop these on the floor. For example, we might have a sync in progress, which throws. --- net/nwfnet-sntp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/nwfnet-sntp.lua b/net/nwfnet-sntp.lua index 11ef3ee..4020665 100644 --- a/net/nwfnet-sntp.lua +++ b/net/nwfnet-sntp.lua @@ -1,5 +1,5 @@ local function dosntp(server) - sntp.sync((require "nwfnet").sntp, + pcall(sntp.sync,(require "nwfnet").sntp, function(sec,usec,server) rtctime.set(sec,usec); (require"nwfnet"):runnet("sntpsync",sec,usec,server) end, function(err) (require"nwfnet"):runnet("sntperr",err) end ) -- 2.50.1