Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricve committed Jan 3, 2024
2 parents 57c49a8 + 8da34a6 commit 1f133af
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
18 changes: 13 additions & 5 deletions machinery/src/components/Kerberos.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,22 @@ func RunAgent(configDirectory string, configuration *models.Configuration, commu
// Establishing the camera connection without backchannel if no substream
rtspUrl := config.Capture.IPCamera.RTSP
rtspClient := captureDevice.SetMainClient(rtspUrl)

err := rtspClient.Connect(context.Background())
if err != nil {
log.Log.Error("components.Kerberos.RunAgent(): error connecting to RTSP stream: " + err.Error())
rtspClient.Close()
if rtspUrl != "" {
err := rtspClient.Connect(context.Background())
if err != nil {
log.Log.Error("components.Kerberos.RunAgent(): error connecting to RTSP stream: " + err.Error())
rtspClient.Close()
rtspClient = nil
time.Sleep(time.Second * 3)
return status
}
} else {
log.Log.Error("components.Kerberos.RunAgent(): no rtsp url found in config, please provide one.")
rtspClient = nil
time.Sleep(time.Second * 3)
return status
}

log.Log.Info("components.Kerberos.RunAgent(): opened RTSP stream: " + rtspUrl)

// Get the video streams from the RTSP server.
Expand Down
4 changes: 2 additions & 2 deletions snap/snapcraft.yaml → snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ apps:
plugs: [ network, network-bind ]
parts:
agent:
source: https://github.com/kerberos-io/agent/releases/download/f739d52/agent-$SNAP_ARCH.tar
plugin: dump
source: https://github.com/kerberos-io/agent/releases/download/21c0e01/agent-amd64.tar
plugin: dump

0 comments on commit 1f133af

Please sign in to comment.