diff --git a/src/main.c b/src/main.c
index d9c3ddb0d28c48e7dbf7663068b9c0aabe9e3908..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;
-
- mpdclient_put_connection(mpd);
- check_reconnect();
}
static char *
g_free(name);
doupdate();
- mpdclient_disconnect(mpd);
mpdclient_connect(mpd);
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;
- mpdclient_put_connection(mpd);
- check_reconnect();
auto_update_timer();
}