5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-26 04:21:38 +00:00

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 b.c.Listen(stream)
go func(stream *gitter.Stream, room string) { go func(stream *gitter.Stream, room string) {
for { for event := range stream.Event {
event := <-stream.Event
switch ev := event.Data.(type) { switch ev := event.Data.(type) {
case *gitter.MessageReceived: case *gitter.MessageReceived:
// check for ZWSP to see if it's not an echo // check for ZWSP to see if it's not an echo