feat(mochi): allows broker to run with and without tls at the same time
This commit is contained in:
parent
363849ba4e
commit
bae078b734
|
|
@ -140,8 +140,8 @@ func main() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Println("Mqtt Broker is running with TLS")
|
log.Println("Mqtt Broker is running with TLS at port 8883")
|
||||||
} else {
|
}
|
||||||
if *tcpAddr != "" {
|
if *tcpAddr != "" {
|
||||||
//tcp := listeners.NewTCP("t1", *tcpAddr, &listeners.Config{
|
//tcp := listeners.NewTCP("t1", *tcpAddr, &listeners.Config{
|
||||||
// TLSConfig: tlsConfig,
|
// TLSConfig: tlsConfig,
|
||||||
|
|
@ -152,8 +152,7 @@ func main() {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.Println("Mqtt Broker is running without TLS, (it's dangerous)")
|
log.Println("Mqtt Broker is running without TLS at port 1883")
|
||||||
}
|
|
||||||
|
|
||||||
if *wsAddr != "" {
|
if *wsAddr != "" {
|
||||||
ws := listeners.NewWebsocket("ws1", *wsAddr, nil)
|
ws := listeners.NewWebsocket("ws1", *wsAddr, nil)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user