From: Max Kellermann Date: Sun, 19 Mar 2017 11:49:42 +0000 (+0100) Subject: main: remove check_reconnect() X-Git-Tag: v0.26~21 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=214eea183d291601a1a36f9feed9bc7f1ef031de;p=ncmpc.git main: remove check_reconnect() Assume that mpdclient_lost_callback() is everything we need to implement. --- 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(); }