From 20c04f7977a359bd31c172bb79a92ab59efef070 Mon Sep 17 00:00:00 2001 From: Wim Date: Wed, 23 Nov 2016 23:51:51 +0100 Subject: Fix loop because of closed channel. Fixes #89 --- bridge/gitter/gitter.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bridge/gitter/gitter.go b/bridge/gitter/gitter.go index 95375b1f..ffc5e93f 100644 --- a/bridge/gitter/gitter.go +++ b/bridge/gitter/gitter.go @@ -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 -- cgit v1.2.3