commit 945b2d23ed655bc73d8eab9550e0e0b74eca3436
parent 0cd2c0ca52531635db2a43ddea4516646a0e832d
Author: decentral1se <cellarspoon@riseup.net>
Date: Wed, 4 Dec 2024 00:54:26 +0100
fix: use tls
See https://codeberg.org/mellium/xmpp/issues/430
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/warawara.go b/warawara.go
@@ -69,9 +69,8 @@ func joinXMPP() {
ctx, cancel = context.WithCancel(context.Background())
//defer cancel()
var err error
- // TLS disabled to avoid a 3min timeout before connecting - whyyyyyyy?
- // NOTE(d1): https://codeberg.org/mellium/xmpp/issues/430
- dialer := dial.Dialer{NoTLS: true}
+ dialer := dial.Dialer{}
+ dialer.Timeout = 10 * time.Second // https://codeberg.org/mellium/xmpp/issues/430
conn, err := dialer.Dial(ctx, "tcp", jid.MustParse(botJID))
if err != nil {
fmt.Println("Error:", botServer, err)