Skip to content

Commit

Permalink
Added check to the Buffer in Socket.process.
Browse files Browse the repository at this point in the history
  • Loading branch information
reklatsmasters committed Feb 13, 2018
1 parent ba804eb commit 0688685
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/socket.js
Expand Up @@ -143,7 +143,7 @@ module.exports = class Socket extends Duplex {
* @param {Buffer} data
*/
process(data) {
if (this[pReadableClosed]) {
if (!Buffer.isBuffer(data) || this[pReadableClosed]) {
return false
}

Expand Down

0 comments on commit 0688685

Please sign in to comment.