mirror of
https://github.com/AlexxIT/go2rtc.git
synced 2025-10-20 15:05:57 +08:00
Fix panic for HomeKit source without SRTP module #712
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package homekit
|
package homekit
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
"io"
|
"io"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
@@ -134,6 +135,10 @@ var log zerolog.Logger
|
|||||||
var servers map[string]*server
|
var servers map[string]*server
|
||||||
|
|
||||||
func streamHandler(url string) (core.Producer, error) {
|
func streamHandler(url string) (core.Producer, error) {
|
||||||
|
if srtp.Server == nil {
|
||||||
|
return nil, errors.New("homekit: can't work without SRTP server")
|
||||||
|
}
|
||||||
|
|
||||||
return homekit.Dial(url, srtp.Server)
|
return homekit.Dial(url, srtp.Server)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user