mirror of
https://github.com/nonoo/kappanhang.git
synced 2026-01-01 22:40:00 +01:00
Treat audio errors as unrecoverable errors
This commit is contained in:
parent
0678ac84bb
commit
3c22b401e3
4
audio.go
4
audio.go
|
|
@ -52,7 +52,7 @@ func (a *audioStruct) playLoop() {
|
|||
written, err := a.source.Write(d)
|
||||
if err != nil {
|
||||
if _, ok := err.(*os.PathError); !ok {
|
||||
log.Error(err)
|
||||
exit(err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
@ -74,7 +74,7 @@ func (a *audioStruct) recLoop() {
|
|||
n, err := a.sink.Read(frameBuf)
|
||||
if err != nil {
|
||||
if _, ok := err.(*os.PathError); !ok {
|
||||
log.Error(err)
|
||||
exit(err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue