mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2024-11-21 01:52:01 -08:00
Update client.go
This commit is contained in:
parent
daf37cf5a8
commit
e62b7fa0c7
@ -207,6 +207,10 @@ func (c *Client) Resume(state SMState) error {
|
|||||||
|
|
||||||
func (c *Client) Disconnect() {
|
func (c *Client) Disconnect() {
|
||||||
// TODO : Wait for server response for clean 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 {
|
if c.transport != nil {
|
||||||
_ = c.transport.Close()
|
_ = c.transport.Close()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user