Permalink
Browse files

[minor] Remove no longer needed workaround for slab buffers retention

  • Loading branch information...
lpinca committed Dec 3, 2016
1 parent 2c8275c commit 15a63d203edcd3a1486cfcf5516a2ca0d0b2cbc8
Showing with 1 addition and 8 deletions.
  1. +1 −8 transformer.js
View
@@ -190,13 +190,6 @@ Transformer.readable('request', function request(req, res) {
Transformer.readable('upgrade', function upgrade(req, socket, head) {
if (!this.test(req)) return this.emit('previous::upgrade', req, socket, head);
- //
- // Copy buffer to prevent large buffer retention in Node core.
- // @see jmatthewsr-ms/node-slab-memory-issues
- //
- var buffy = new Buffer(head.length);
- head.copy(buffy);
-
//
// See Transformer#request for an explanation of this madness.
//
@@ -206,7 +199,7 @@ Transformer.readable('upgrade', function upgrade(req, socket, head) {
});
log('handling HTTP upgrade for url: %s', req.url);
- this.forEach('upgrade', req, socket, this.emits('upgrade', req, socket, buffy));
+ this.forEach('upgrade', req, socket, this.emits('upgrade', req, socket, head));
});
/**

0 comments on commit 15a63d2

Please sign in to comment.