Rewrite exec handler

This commit is contained in:
Alex X
2025-02-23 20:56:48 +03:00
parent 7d41dc21c1
commit 6fb59949a2
7 changed files with 113 additions and 71 deletions
+1 -5
View File
@@ -2,7 +2,6 @@ package stdin
import (
"encoding/json"
"errors"
"github.com/AlexxIT/go2rtc/pkg/core"
"github.com/pion/rtp"
@@ -42,10 +41,7 @@ func (c *Client) Stop() (err error) {
if c.sender != nil {
c.sender.Close()
}
if c.cmd.Process == nil {
return nil
}
return errors.Join(c.cmd.Process.Kill(), c.cmd.Wait())
return c.cmd.Close()
}
func (c *Client) MarshalJSON() ([]byte, error) {