fix(mochi): broker to run with and without tls at the same time

This commit is contained in:
Leandro Antônio Farias Machado 2023-05-29 08:04:33 -03:00
parent 63ff7e23bb
commit 78ef20793c

View File

@ -131,7 +131,7 @@ func main() {
}
if *tcpAddr != "" {
tcp := listeners.NewTCP("t1", *tcpAddr, &listeners.Config{
tcp := listeners.NewTCP("t1", ":8883", &listeners.Config{
TLSConfig: tlsConfig,
})
err := server.AddListener(tcp)
@ -146,7 +146,7 @@ func main() {
//tcp := listeners.NewTCP("t1", *tcpAddr, &listeners.Config{
// TLSConfig: tlsConfig,
//})
tcp := listeners.NewTCP("t1", *tcpAddr, nil)
tcp := listeners.NewTCP("t1", ":1883", nil)
err := server.AddListener(tcp)
if err != nil {
log.Fatal(err)