[PATCH] if the server is down, recheck every two minutes (instead of every 5sec)

1 view
Skip to first unread message

que...@gmail.com

unread,
Oct 24, 2008, 4:15:20 PM10/24/08
to wmii...@googlegroups.com, ba...@jukie.net, Jan-David Quesel
From: Jan-David Quesel <que...@informatik.uni-oldenburg.de>

---
plugins/mpd.lua | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/plugins/mpd.lua b/plugins/mpd.lua
index d18a1f1..3e096b9 100644
--- a/plugins/mpd.lua
+++ b/plugins/mpd.lua
@@ -76,6 +76,11 @@ local function update_mpd_status (time_since_update)
local printout = _command("export MPD_HOST=" .. wmii.get_conf("mpd.server") .. "&& export MPD_PORT=" .. wmii.get_conf("mpd.port") .. " && mpc")

widget:show(printout)
+
+ -- if we dont get a response from the server we test every 2 minutes
+ if printout == nil or printout == "" then
+ return 120
+ end
return 5
end

--
1.6.0.2

Reply all
Reply to author
Forward
0 new messages