Skip to content

Commit

Permalink
revert: fix(binary): fix binary events being marked as regular events (
Browse files Browse the repository at this point in the history
…#76)

This reverts commit 4052747.

The change is not compatible with a Socket.IO v3 server.
  • Loading branch information
darrachequesne committed Dec 29, 2020
1 parent 4052747 commit c9d2955
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
var client = require('redis').createClient;
var parser = require('socket.io-parser');
var msgpack = require('notepack.io');
var hasBin = require('has-binary2');
var debug = require('debug')('socket.io-emitter');

/**
Expand Down Expand Up @@ -124,7 +123,7 @@ Emitter.prototype.of = function(nsp){
Emitter.prototype.emit = function(){
// packet
var args = Array.prototype.slice.call(arguments);
var packet = { type: hasBin(args) ? parser.BINARY_EVENT : parser.EVENT, data: args, nsp: this.nsp };
var packet = { type: parser.EVENT, data: args, nsp: this.nsp };

var opts = {
rooms: this._rooms,
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
},
"dependencies": {
"debug": "~3.1.0",
"has-binary2": "~1.0.2",
"notepack.io": "~2.1.0",
"redis": "2.6.3",
"socket.io-parser": "3.1.2"
Expand Down

0 comments on commit c9d2955

Please sign in to comment.