Ensure channels are closed properly and go-loops terminate.