diff --git a/lib/deceiver.js b/lib/deceiver.js index 7d3b27f..48dc20e 100644 --- a/lib/deceiver.js +++ b/lib/deceiver.js @@ -241,7 +241,7 @@ Deceiver.prototype.emitBody = function emitBody (buffer) { Deceiver.prototype._emitEmpty = function _emitEmpty () { // Emit data to force out handling of UPGRADE - var empty = new Buffer(0) + var empty = Buffer.concat([]) if (this.socket.ondata) { this.socket.ondata(empty, 0, 0) } else { this.socket.emit('data', empty) }