Skip to content

Commit

Permalink
Fix panic for HomeKit source without SRTP module #712
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Oct 27, 2023
1 parent c27e735 commit 2dd4765
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/homekit/homekit.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package homekit

import (
"errors"
"io"
"net"
"net/http"
Expand Down Expand Up @@ -134,6 +135,10 @@ var log zerolog.Logger
var servers map[string]*server

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)
}

Expand Down

0 comments on commit 2dd4765

Please sign in to comment.