Code

increment version number to 0.27
[ncmpc.git] / src / main.c
index d9c3ddb0d28c48e7dbf7663068b9c0aabe9e3908..5b906c513173385869779869c19f07f2b02784f9 100644 (file)
@@ -130,9 +130,6 @@ auto_update_timer(void)
                disable_update_timer();
 }
 
-static void
-check_reconnect(void);
-
 static void
 do_mpd_update(void)
 {
@@ -147,9 +144,6 @@ do_mpd_update(void)
 
        screen_update(mpd);
        mpd->events = 0;
-
-       mpdclient_put_connection(mpd);
-       check_reconnect();
 }
 
 static char *
@@ -201,21 +195,11 @@ timer_reconnect(gcc_unused gpointer data)
        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)
 {
@@ -309,8 +293,6 @@ void end_input_event(void)
        screen_update(mpd);
        mpd->events = 0;
 
-       mpdclient_put_connection(mpd);
-       check_reconnect();
        auto_update_timer();
 }