Declare tlsConfig properly instead of using xmpp.DefaultConfig.

http_upload
Martin Dosch 4 years ago
parent ee7bf1fb71
commit c36bd5cb40

@ -6,6 +6,7 @@ package main
import (
"bufio"
"crypto/tls"
"errors"
"io"
"log"
@ -240,7 +241,7 @@ func main() {
}
// Use ALPN
tlsConfig := xmpp.DefaultConfig
var tlsConfig tls.Config
tlsConfig.ServerName = strings.Split(server, ":")[0]
tlsConfig.NextProtos = append(tlsConfig.NextProtos, "xmpp-client")

Loading…
Cancel
Save