Fix hang when pulseaudio goes offline

This commit is contained in:
Nonoo 2020-11-03 12:49:32 +01:00
parent 774b76c9cd
commit b4836751f2

View file

@ -5,6 +5,7 @@ package main
import (
"bytes"
"errors"
"io"
"os"
"sync"
"time"
@ -285,6 +286,10 @@ func (a *audioStruct) recLoopFromVirtualSoundcard(deinitNeededChan, deinitFinish
if err != nil {
if _, ok := err.(*os.PathError); !ok {
reportError(err)
if err == io.EOF {
<-deinitNeededChan
return
}
}
}