From 7da0e005f34bd8ce305b8ece7a33a8405bbaba87 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 29 Oct 2008 22:32:50 +0100 Subject: output: delay reopen after device failure When one of several output devices failed, MPD tried to reopen it quite often, wasting a lot of resources. This patch adds a delay: wait 10 seconds before retrying. This might be changed to exponential delays later, but for now, it makes the problem go away. --- src/output_init.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/output_init.c') diff --git a/src/output_init.c b/src/output_init.c index 9393e295b..89853ff9e 100644 --- a/src/output_init.c +++ b/src/output_init.c @@ -87,6 +87,7 @@ int audio_output_init(struct audio_output *ao, ConfigParam * param) ao->plugin = plugin; ao->enabled = true; ao->open = false; + ao->reopen_after = 0; ao->convBuffer = NULL; ao->convBufferLen = 0; -- cgit v1.2.3