Skip to content

Commit

Permalink
Merge pull request #546 from ChIoT-Tech/master
Browse files Browse the repository at this point in the history
Mosquitto related changes (updated config and comments).
  • Loading branch information
MattBrittan committed Oct 7, 2021
2 parents 175027d + a06a925 commit 128a58d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 1 addition & 2 deletions fvt/docker/mosquitto.conf
@@ -1,11 +1,10 @@
user mosquitto

allow_anonymous true
allow_duplicate_messages false
connection_messages true
log_dest stdout
log_timestamp true
log_type all
persistence false

port 1883
listener 1883
5 changes: 4 additions & 1 deletion options.go
Expand Up @@ -58,6 +58,9 @@ type ConnectionAttemptHandler func(broker *url.URL, tlsCfg *tls.Config) *tls.Con

// ClientOptions contains configurable options for an Client. Note that these should be set using the
// relevant methods (e.g. AddBroker) rather than directly. See those functions for information on usage.
// WARNING: Create the below using NewClientOptions unless you have a compelling reason not to. It is easy
// to create a configuration with difficult to trace issues (e.g. Mosquitto 2.0.12+ will reject connections
// with KeepAlive=0 by default).
type ClientOptions struct {
Servers []*url.URL
ClientID string
Expand All @@ -74,7 +77,7 @@ type ClientOptions struct {
ProtocolVersion uint
protocolVersionExplicit bool
TLSConfig *tls.Config
KeepAlive int64
KeepAlive int64 // Warning: Some brokers may reject connections with Keepalive = 0.
PingTimeout time.Duration
ConnectTimeout time.Duration
MaxReconnectInterval time.Duration
Expand Down

0 comments on commit 128a58d

Please sign in to comment.