Close both ends of the pipe on early disposal