split webrtc & WS destroy.

This commit is contained in:
Miroslav Šedivý 2021-03-25 14:08:26 +01:00
parent a8e44160dc
commit 78b6264494
5 changed files with 57 additions and 33 deletions

22
internal/utils/errors.go Normal file
View file

@ -0,0 +1,22 @@
package utils
import "fmt"
func ErrorsJoin(errs []error) error {
var resErr error
for _, err := range errs {
if err == nil {
continue
}
if resErr == nil {
resErr = err
continue
}
resErr = fmt.Errorf("%w; %s", resErr, err.Error())
}
return resErr
}