summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3b7d3e2)
raw | patch | inline | side by side (parent: 3b7d3e2)
author | Max Kellermann <max.kellermann@gmail.com> | |
Sun, 19 Mar 2017 11:49:42 +0000 (12:49 +0100) | ||
committer | Max Kellermann <max.kellermann@gmail.com> | |
Sun, 19 Mar 2017 12:04:10 +0000 (13:04 +0100) |
Assume that mpdclient_lost_callback() is everything we need to
implement.
implement.
src/main.c | patch | blob | history |
diff --git a/src/main.c b/src/main.c
index 8ade659e69ddc0f997fa2bfe46a74a6754568998..5b906c513173385869779869c19f07f2b02784f9 100644 (file)
--- a/src/main.c
+++ b/src/main.c
disable_update_timer();
}
-static void
-check_reconnect(void);
-
static void
do_mpd_update(void)
{
screen_update(mpd);
mpd->events = 0;
-
- check_reconnect();
}
static char *
return FALSE;
}
-static void
-check_reconnect(void)
-{
- if (mpdclient_is_dead(mpd) && reconnect_source_id == 0)
- /* reconnect when the connection is lost */
- reconnect_source_id = g_timeout_add(1000, timer_reconnect,
- NULL);
-}
-
void
mpdclient_connected_callback(void)
{
screen_update(mpd);
mpd->events = 0;
- check_reconnect();
auto_update_timer();
}