mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2026-04-25 00:22:55 -07:00
Use Transport in Component
This commit is contained in:
committed by
Mickaël Rémond
parent
96fccbd399
commit
e97d290e2b
@@ -191,9 +191,8 @@ func (c *Client) Resume(state SMState) error {
|
||||
func (c *Client) Disconnect() {
|
||||
_ = c.SendRaw("</stream:stream>")
|
||||
// TODO: Add a way to wait for stream close acknowledgement from the server for clean disconnect
|
||||
conn := c.transport
|
||||
if conn != nil {
|
||||
_ = conn.Close()
|
||||
if c.transport != nil {
|
||||
_ = c.transport.Close()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user