From 214eea183d291601a1a36f9feed9bc7f1ef031de Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 19 Mar 2017 12:49:42 +0100 Subject: [PATCH] main: remove check_reconnect() Assume that mpdclient_lost_callback() is everything we need to implement. --- src/main.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/main.c b/src/main.c index 8ade659..5b906c5 100644 --- a/src/main.c +++ b/src/main.c @@ -130,9 +130,6 @@ auto_update_timer(void) disable_update_timer(); } -static void -check_reconnect(void); - static void do_mpd_update(void) { @@ -147,8 +144,6 @@ do_mpd_update(void) screen_update(mpd); mpd->events = 0; - - check_reconnect(); } static char * @@ -205,15 +200,6 @@ timer_reconnect(gcc_unused gpointer data) 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) { @@ -307,7 +293,6 @@ void end_input_event(void) screen_update(mpd); mpd->events = 0; - check_reconnect(); auto_update_timer(); } -- 2.30.2