From 60d2392022795d50fc3cf1f28590774ae67bb1de Mon Sep 17 00:00:00 2001 From: Andrew Karpow Date: Sun, 19 Oct 2014 20:27:11 +0200 Subject: [PATCH] set mpd timeout only after connect, fixes #32 --- src/mpd_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mpd_client.c b/src/mpd_client.c index 0da2297..ea10178 100644 --- a/src/mpd_client.c +++ b/src/mpd_client.c @@ -55,7 +55,6 @@ int callback_mpd(struct mg_connection *c) cmd_id != MPD_API_GET_MPDHOST && cmd_id != MPD_API_SET_MPDPASS) return MG_TRUE; - mpd_connection_set_timeout(mpd.conn, 10000); switch(cmd_id) { case MPD_API_UPDATE_DB: @@ -287,6 +286,7 @@ void mpd_poll(struct mg_server *s) } fprintf(stderr, "MPD connected.\n"); + mpd_connection_set_timeout(mpd.conn, 10000); mpd.conn_state = MPD_CONNECTED; break; -- 2.20.1