Add Teardown handler for RTSP server (untested)

This commit is contained in:
Alexey Khit
2023-01-18 12:21:54 +03:00
parent f9d5ab9d0a
commit 23f72d111e
+6
View File
@@ -655,6 +655,12 @@ func (c *Conn) Accept() error {
}
return err
case MethodTeardown:
res := &tcp.Response{Request: req}
_ = c.Response(res)
c.state = StateNone
return c.conn.Close()
default:
return fmt.Errorf("unsupported method: %s", req.Method)
}