Don't cancel the handler when server stream ends, this will allow the handler
to finish.
Use TMChan instead of TMVar for consuming the server stream, this allows the
handler to indicate that it has finished and there will be no more output being
produced.
Changes:
Fixes #311