More roboust connection/channel closing