Destroy the dispatch before closing the channels.

This way, dispatch could notify its clients about the termination.