close UDP connection when RTSPClient Stop

pull/154/head
milkywayrivers@gmail.com 2019-03-16 15:04:12 +08:00
parent 5f26114253
commit 6e05b2202d
1 changed files with 4 additions and 0 deletions

View File

@ -501,6 +501,10 @@ func (client *RTSPClient) Stop() {
client.Conn.Close()
client.Conn = nil
}
if client.UDPServer != nil{
client.UDPServer.Stop()
client.UDPServer = nil
}
}
func (client *RTSPClient) RequestWithPath(method string, path string, headers map[string]string, needResp bool) (resp *Response, err error) {