I can tell the following code executes as far as logging "second piece of index-colorbox.html written", but not to logging "writeUntilBufferFull()".
Any suggestions why the "drain" event doesn't appear to fire under 0.10.25?
writeStream.write("<title>" + title + "</title>\n");
fs.readFile("piece/index-second.html", function (error, buffer) {
//...
writeStream.write(buffer);
console.log("second piece of index-colorbox.html written");
writeStream.addListener("drain", writeUntilBufferFull);
writeStream.write("<table>\n");
});
function writeUntilBufferFull() {
var longDate, urlFileName, htmlFileName, row;
console.log("writeUntilBufferFull() p=", p, " metadata:", JSON.stringify(pictureMetadata[p]));
//...
}
I can tell the following code executes as far as logging "second piece of index-colorbox.html written", but not to logging "writeUntilBufferFull()".