Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ backup/*
dist/*
/.idea
/bin
/bin/*
/bin/*
.DS_Store
11 changes: 11 additions & 0 deletions functions/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package functions

import (
"context"
"crypto/tls"
"errors"
"fmt"
"net"
Expand Down Expand Up @@ -329,6 +330,11 @@ func setupMQTT(server *config.Server) error {
opts.SetConnectionLostHandler(func(c mqtt.Client, e error) {
slog.Warn("detected broker connection lost for", "server", server.Broker)
})

opts.SetTLSConfig(&tls.Config{
InsecureSkipVerify: true,
})

Mqclient = mqtt.NewClient(opts)
var connecterr error
for count := 0; count < 3; count++ {
Expand Down Expand Up @@ -390,6 +396,11 @@ func setupMQTTSingleton(server *config.Server, publishOnly bool) error {
opts.SetConnectionLostHandler(func(c mqtt.Client, e error) {
slog.Warn("detected broker connection lost for", "server", server.Broker)
})

opts.SetTLSConfig(&tls.Config{
InsecureSkipVerify: true,
})

Mqclient = mqtt.NewClient(opts)

var connecterr error
Expand Down
Loading