Fix race in stopChans cleanup

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>