summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmpp.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmpp.go b/xmpp.go
index 89be5a9..5f1d1f9 100644
--- a/xmpp.go
+++ b/xmpp.go
@@ -28,6 +28,7 @@ func (l *Limox) xmpp(jid string, pwd string) {
receiver := make(chan xml.Token)
termination := make(chan bool)
go rxRoutine(conn, receiver, termination)
+ defer func() { termination <- true }()
enc := xml.NewEncoder(conn)
dbg := xml.NewEncoder(os.Stdout)
@@ -42,7 +43,6 @@ func (l *Limox) xmpp(jid string, pwd string) {
case ev := <-l.GuiEvents:
switch ev {
case Disconnect:
- termination <- true
return
default:
log.Fatalf("Unknown GuiEvent '%d'!\n", ev)