flynn/flynn — pull request #678 by titanous (2014-12-30 23:12:44+00:00)
Title: host/logbuf: Fix goroutine leak

Before this change, we’d keep hitting the `l.closed` path through the `select` and keep creating new goroutines. Instead, use a copy of the channel and set it to nil after triggering the `StopAtEOF` goroutine, which ensures the path won’t be hit again.

This fixes the issue where log dumping hangs or slows significantly.