Update Disconnect method on client

Remove wrong stanza sends
160-regression
remicorniere 4 years ago committed by GitHub
parent ccc573c3b2
commit daf37cf5a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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()
}

Loading…
Cancel
Save