From 18291a2e89995a1fb23a6a23b42f28d14bbc13fb Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 2 Aug 2017 09:18:13 +0200 Subject: [PATCH] options: don't override the libmpdclient default timeout libmpdclient's default is 30s, which is just as good as our 5s timeout. Why change that with extra code? --- src/defaults.h | 2 -- src/options.c | 5 +---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/defaults.h b/src/defaults.h index bcd21ac..258a874 100644 --- a/src/defaults.h +++ b/src/defaults.h @@ -34,8 +34,6 @@ #define DEFAULT_LYRICS_TIMEOUT 100 -#define DEFAULT_MPD_TIMEOUT 5000 /* 5 seconds */ - #define DEFAULT_SCROLL TRUE #define DEFAULT_SCROLL_SEP " *** " diff --git a/src/options.c b/src/options.c index f6fa63f..ca6d415 100644 --- a/src/options.c +++ b/src/options.c @@ -61,7 +61,7 @@ options_t options = { .audible_bell = true, .bell_on_wrap = true, .status_message_time = 3, - .timeout_ms = DEFAULT_MPD_TIMEOUT, + .timeout_ms = 0, #ifndef NCMPC_MINI .scroll = DEFAULT_SCROLL, .welcome_screen_list = true, @@ -384,9 +384,6 @@ options_init(void) #ifndef NCMPC_MINI options.scroll_sep = g_strdup(DEFAULT_SCROLL_SEP); #endif - if (getenv("MPD_TIMEOUT") != NULL) - /* let libmpdclient parse the environment variable */ - options.timeout_ms = 0; } void -- 2.30.2