mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2024-11-21 01:52:01 -08:00
Close keepalive when recv() ends in client.go
This commit is contained in:
parent
6e84084bb3
commit
d4960afc97
@ -379,9 +379,8 @@ func (c *Client) sendWithWriter(writer io.Writer, packet []byte) error {
|
||||
|
||||
// Loop: Receive data from server
|
||||
func (c *Client) recv(keepaliveQuit chan<- struct{}) {
|
||||
defer func() {
|
||||
close(keepaliveQuit)
|
||||
}()
|
||||
defer close(keepaliveQuit)
|
||||
|
||||
for {
|
||||
val, err := stanza.NextPacket(c.transport.GetDecoder())
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user