diff options
Diffstat (limited to 'xmpp/xmpp.go')
-rw-r--r-- | xmpp/xmpp.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xmpp/xmpp.go b/xmpp/xmpp.go index 5be12c4..5d5e9a3 100644 --- a/xmpp/xmpp.go +++ b/xmpp/xmpp.go @@ -16,7 +16,7 @@ const ( ShouldDisconnectEvent ) -func Run(rxChan chan Event, txChan chan any, jid string, pwd string) { +func Run(ch chan any, jid string, pwd string) { conn, err := setupConn(jid) if err != nil { log.Print(err) @@ -36,12 +36,12 @@ func Run(rxChan chan Event, txChan chan any, jid string, pwd string) { end := sendStreamStart(enc, dbg, jid) defer sendStreamEnd(enc, dbg, end) - txChan <- ConnectEvent - defer func() { txChan <- DisconnectEvent }() + ch <- ConnectEvent + defer func() { ch <- DisconnectEvent }() for { select { - case ev := <-rxChan: + case ev := <-ch: switch ev { case ShouldDisconnectEvent: return |