joewalnes/websocketd — pull request #2 by ajitgeorge (2013-02-28 21:10:02+00:00)
Title: Fix output loss when process closes before its output is fully read

pipeStdErr signals the done channel as soon as the process closes,
resulting in the acceptWebSocket goroutine terminating even if
websocketd hasn't finished reading all of the process' stdout.

This implemenation replaces the signalling channels with input
channels. The acceptWebSocket goroutine terminates when either input
source (process or websocket) is no longer available.