diff --git a/lib/streams/BufferedWriteStream.js b/lib/streams/BufferedWriteStream.js index d10c8c7..6820c82 100644 --- a/lib/streams/BufferedWriteStream.js +++ b/lib/streams/BufferedWriteStream.js @@ -1,4 +1,5 @@ var events = require('events'), + Dequeue = require('dequeue'), util = require('util'); module.exports = BufferedWriteStream; @@ -6,7 +7,7 @@ module.exports = BufferedWriteStream; function BufferedWriteStream(stream) { var that = this; this.stream = stream; - this.buffer = []; + this.buffer = new Dequeue(); this.canWrite = false; this.bytes = 0; diff --git a/package.json b/package.json index 44a12ad..a24cdc5 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,8 @@ "lib": "lib" }, "dependencies": { - "async": "0.1.15" + "async": "0.1.15", + "dequeue": "1.0.3" }, "devDependencies": { "vows": "0.6.2",