attachment.stream.on("close", function() {