Add Teardown handler for RTSP server (untested)
This commit is contained in:
@@ -655,6 +655,12 @@ func (c *Conn) Accept() error {
|
|||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
|
|
||||||
|
case MethodTeardown:
|
||||||
|
res := &tcp.Response{Request: req}
|
||||||
|
_ = c.Response(res)
|
||||||
|
c.state = StateNone
|
||||||
|
return c.conn.Close()
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return fmt.Errorf("unsupported method: %s", req.Method)
|
return fmt.Errorf("unsupported method: %s", req.Method)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user