antage/eventsource — pull request #16 by flyingmutant (2014-09-13 10:53:56+00:00)
Title: Do not close any channels to avoid racy "send on closed channel" panics

Example panic, happened after the eventsource was closed:

```
panic: runtime error: send on closed channel

goroutine 147858 [running]:
runtime.panic(0x465000, 0x77641e)
/usr/local/Cellar/go/1.3.1/libexec/src/pkg/runtime/panic.c:279 +0xf5
github.com/sporttech/eventsource.func·001()
/Users/mrbrbr/dev/go/src/github.com/sporttech/eventsource/consumer.go:73 +0x384
```

There is no need to close any channels — it does not impact the GC, but
is only a signal to receivers that no data will be following (see
[here](https://groups.google.com/forum/#!msg/golang-nuts/pZwdYRGxCIk/qpbHxRRPJdUJ)).

As nothing in this package listens to `close()` of any channel, simply
removing all `close()` calls both simplifies the code and avoids
unexpected `panic()`s.