From 9684a8ff690f0d75e284f8845696c5057926d276 Mon Sep 17 00:00:00 2001 From: Martin Dosch Date: Sun, 25 Feb 2024 12:25:57 +0100 Subject: [PATCH] Close stream before closing connection. --- xmpp.go | 1 + 1 file changed, 1 insertion(+) diff --git a/xmpp.go b/xmpp.go index 1c3c773..85957c0 100644 --- a/xmpp.go +++ b/xmpp.go @@ -330,6 +330,7 @@ func NewClientNoTLS(host, user, passwd string, debug bool) (*Client, error) { // Close closes the XMPP connection func (c *Client) Close() error { if c.conn != (*tls.Conn)(nil) { + fmt.Fprintf(c.stanzaWriter, "\n") return c.conn.Close() } return nil