Change position of close XMPP receiver log.

This commit is contained in:
Chteufleur 2016-09-18 07:38:18 +02:00
parent eccf505942
commit f1443ca444
1 changed files with 5 additions and 3 deletions

View File

@ -175,7 +175,10 @@ func (x *XMPP) sender() {
func (x *XMPP) receiver() { func (x *XMPP) receiver() {
defer close(x.In) defer func() {
log.Println("Close XMPP receiver")
close(x.In)
}()
for { for {
start, err := x.stream.Next() start, err := x.stream.Next()
@ -215,8 +218,7 @@ func (x *XMPP) receiver() {
x.In <- v x.In <- v
} }
} }
log.Println("Close XMPP receiver")
} }
// BUG(matt): Filter channels are not closed when the stream is closed. // BUG(matt): Filter channels are not closed when the stream is closed.