aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian C. (anrxc) <anrxc@sysphere.org>2009-09-10 17:04:41 +0200
committerAdrian C. (anrxc) <anrxc@sysphere.org>2009-09-24 15:20:10 +0200
commit080d1e82f535e5a8e6fb3fbb4e1df97f7a21bf42 (patch)
tree7ed930481a34de323b3dd8e396e10d8334007b6c
parentee281a7e40b80ca0abc20ed31d2b409263db913b (diff)
downloadvicious-legacy-080d1e82f535e5a8e6fb3fbb4e1df97f7a21bf42.tar.xz
Curl connect timeout 1s, max time 3s
-rw-r--r--gmail.lua2
-rw-r--r--hddtemp.lua2
-rw-r--r--weather.lua2
3 files changed, 3 insertions, 3 deletions
diff --git a/gmail.lua b/gmail.lua
index 6e12c12..bcb815f 100644
--- a/gmail.lua
+++ b/gmail.lua
@@ -25,7 +25,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
diff --git a/hddtemp.lua b/hddtemp.lua
index 0cc6c20..38bbe13 100644
--- a/hddtemp.lua
+++ b/hddtemp.lua
@@ -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
diff --git a/weather.lua b/weather.lua
index ed12136..476c969 100644
--- a/weather.lua
+++ b/weather.lua
@@ -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()