mirror of
https://github.com/SuperBFG7/ympd
synced 2024-11-22 21:07:18 +00:00
set mpd timeout only after connect, fixes #32
This commit is contained in:
parent
aa60cb8991
commit
60d2392022
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user