Curl connect timeout 1s, max time 3s
This commit is contained in:
parent
a950bd95d6
commit
1603b5fe82
|
@ -26,7 +26,7 @@ local function worker(format, login)
|
|||
local auth = login[1] .. ":" .. login[2]
|
||||
|
||||
-- Get info from the Gmail atom feed
|
||||
local f = io.popen("curl --max-time 3 -fsu "..auth.." https://mail.google.com/mail/feed/atom")
|
||||
local f = io.popen("curl --connect-timeout 1 -m 3 -fsu "..auth.." https://mail.google.com/mail/feed/atom")
|
||||
|
||||
-- Could be huge don't read it all at once, info we are after is at the top
|
||||
for line in f:lines() do
|
||||
|
|
|
@ -19,7 +19,7 @@ local function worker(format, port)
|
|||
if port == nil then port = 7634 end
|
||||
|
||||
-- Get info from the hddtemp daemon
|
||||
local f = io.popen("curl --max-time 3 -f -s telnet://127.0.0.1:" .. port)
|
||||
local f = io.popen("curl --connect-timeout 1 -fsm 3 telnet://127.0.0.1:" .. port)
|
||||
local hdd_temp = {}
|
||||
|
||||
-- Get temperature data
|
||||
|
|
|
@ -22,7 +22,7 @@ local function worker(format, station)
|
|||
local noaa = "http://weather.noaa.gov/pub/data/observations/metar/decoded/"
|
||||
|
||||
-- Get info from a weather station
|
||||
local f = io.popen("curl --max-time 3 -f -s "..noaa..station..".TXT")
|
||||
local f = io.popen("curl --connect-timeout 1 -fsm 3 "..noaa..station..".TXT")
|
||||
local ws = f:read("*all")
|
||||
f:close()
|
||||
|
||||
|
|
Loading…
Reference in New Issue