From daf37cf5a88e69dddf4011aa064dbc27a9e4fc36 Mon Sep 17 00:00:00 2001 From: remicorniere Date: Tue, 24 Dec 2019 10:44:01 +0000 Subject: [PATCH 1/2] Update Disconnect method on client Remove wrong stanza sends --- client.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/client.go b/client.go index 1c5ea22..f75985a 100644 --- a/client.go +++ b/client.go @@ -207,11 +207,6 @@ func (c *Client) Resume(state SMState) error { func (c *Client) Disconnect() { // TODO : Wait for server response for clean disconnect - presence := stanza.NewPresence(stanza.Attrs{From: c.config.Jid}) - presence.Type = stanza.PresenceTypeUnavailable - c.Send(presence) - c.SendRaw(stanza.StreamClose) - if c.transport != nil { _ = c.transport.Close() } From e62b7fa0c7f52e548ae67343fa1741dd30e7bee2 Mon Sep 17 00:00:00 2001 From: remicorniere Date: Tue, 24 Dec 2019 10:47:25 +0000 Subject: [PATCH 2/2] Update client.go --- client.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client.go b/client.go index f75985a..30c9d7e 100644 --- a/client.go +++ b/client.go @@ -207,6 +207,10 @@ func (c *Client) Resume(state SMState) error { func (c *Client) Disconnect() { // TODO : Wait for server response for clean disconnect + presence := stanza.NewPresence(stanza.Attrs{From: c.config.Jid}) + presence.Type = stanza.PresenceTypeUnavailable + c.Send(presence) + c.SendRaw(stanza.StreamClose) if c.transport != nil { _ = c.transport.Close() }