flatiron/winston — pull request #233 by mkaminski1988 (2013-04-04 17:46:04+00:00)
Title: Fix problem with file logging in callback method

This is related to the problem shown in http://pastebin.com/3vPPEu2S.

This fixes an issue where var opening is never set to false, so the program never gets to reuse streams as written in File.prototype.open. The method _createStream waits for a drain event (that is never fired because the stream buffer doesn't fill up) before setting var opening to false.

I'm new to node.js, so I am not sure if this is a legitimate fix or just a hack. I tested my fix and it seems to work fine, even with log size limits.