Fix loop because of closed channel. Fixes #89

This commit is contained in:
Wim 2016-11-23 23:51:51 +01:00
parent 571f50d734
commit 20c04f7977

View File

@ -65,8 +65,7 @@ func (b *Bgitter) JoinChannel(channel string) error {
go b.c.Listen(stream)
go func(stream *gitter.Stream, room string) {
for {
event := <-stream.Event
for event := range stream.Event {
switch ev := event.Data.(type) {
case *gitter.MessageReceived:
// check for ZWSP to see if it's not an echo