close outgoing and cache error of writing data to closed outgoing