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.
This commit is contained in:
@@ -342,6 +342,7 @@ int enableAudioDevice(unsigned int device)
|
||||
if (device >= audioOutputArraySize)
|
||||
return -1;
|
||||
|
||||
audioOutputArray[device].reopen_after = 0;
|
||||
audioOutputArray[device].enabled = true;
|
||||
idle_add(IDLE_OUTPUT);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user