diff options
Diffstat (limited to 'xmpp.go')
-rw-r--r-- | xmpp.go | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -16,8 +16,6 @@ const ( ) func xmpp(rxChan chan GuiEvent, txChan chan any, jid string, pwd string) { - defer func() { txChan <- XmppDisconnect }() - conn, err := setupConn(jid) if err != nil { log.Print(err) @@ -39,6 +37,7 @@ func xmpp(rxChan chan GuiEvent, txChan chan any, jid string, pwd string) { defer sendStreamEnd(enc, dbg, end) txChan <- XmppConnect + defer func() { txChan <- XmppDisconnect }() for { select { |