Fix unblocking exec error

This commit is contained in:
Alexey Khit
2023-01-13 18:01:01 +03:00
parent d12775a2d7
commit 6b24421722
+7 -1
View File
@@ -91,7 +91,13 @@ func Handle(url string) (streamer.Producer, error) {
chErr := make(chan error)
go func() {
chErr <- cmd.Wait()
err := cmd.Wait()
// unblocking write to channel
select {
case chErr <- err:
default:
log.Trace().Str("url", url).Msg("[exec] close")
}
}()
select {