Skip to content

Commit

Permalink
[refactor] Remove deprecated code used for nodejs v0.8 (#456)
Browse files Browse the repository at this point in the history
  • Loading branch information
darrachequesne authored Dec 8, 2016
1 parent 7bbe456 commit b5292c7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
8 changes: 0 additions & 8 deletions lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,6 @@ function Server (opts) {

var self = this;

// turn off per message deflate for node 0.8
// due to it not supporting DeflateRaw#close
// and thus not working with ws 0.8.x
if (/^v0\.8\./.test(process.version)) {
debug('perMessageDeflate not supported by node 0.8');
this.perMessageDeflate = false;
}

// initialize compression options
['perMessageDeflate', 'httpCompression'].forEach(function (type) {
var compression = self[type];
Expand Down
4 changes: 0 additions & 4 deletions test/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ var expect = require('expect.js');
var request = require('superagent');
var cookieMod = require('cookie');

// are we running on node 0.8?
var NODE_0_8 = /^v0\.8\./.test(process.version);
// are we running on node < 4.4.3 ?
var NODE_LT_443 = (function () {
var parts = process.versions.node.split('.');
Expand Down Expand Up @@ -2409,8 +2407,6 @@ describe('server', function () {
});

describe('permessage-deflate', function () {
if (NODE_0_8) return;

it('should set threshold', function (done) {
var engine = listen({ transports: ['websocket'], perMessageDeflate: { threshold: 0 } }, function (port) {
engine.on('connection', function (conn) {
Expand Down

0 comments on commit b5292c7

Please sign in to comment.