diff options
Diffstat (limited to 'xmpp.go')
-rw-r--r-- | xmpp.go | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -67,21 +67,17 @@ func setupConn(jid string) (*tls.Conn, error) { } func rxRoutine(conn *tls.Conn, tokens chan xml.Token, terminator chan bool) { - quit := false dec := xml.NewDecoder(conn) for { select { case <-terminator: - quit = true + return default: - t, _ := dec.Token() + t, _ := dec.Token() // TODO error handling if t != nil { tokens <- t } } - if quit { - break - } } } |