Skip to content

Commit 812868d

Browse files
committed
[minor] Remove setEncoding on incoming socket
This isn't needed as we don't do any string operations and `setEncoding` results in a higher memory usage and is slower.
1 parent 1783ab0 commit 812868d

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

lib/node-http-proxy/http-proxy.js

-3
Original file line numberDiff line numberDiff line change
@@ -452,9 +452,6 @@ HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, buffer)
452452
socket.pair.cleartext.socket.setKeepAlive(true, 0);
453453
}
454454
}
455-
else {
456-
socket.setEncoding('utf8');
457-
}
458455
}
459456

460457
//

0 commit comments

Comments
 (0)