From 422772f23bea12a878d4e61418066576895bfef6 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 23 Aug 2012 16:03:46 +0200 Subject: [PATCH] net: fix asserts Fixes a 'Converting circular structure to JSON' TypeError. --- lib/net.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/net.js b/lib/net.js index a97da67f3b2..d0a4c641bf4 100644 --- a/lib/net.js +++ b/lib/net.js @@ -375,7 +375,7 @@ Socket.prototype.destroy = function(exception) { function onread(buffer, offset, length) { var handle = this; var self = handle.owner; - assert.equal(handle, self._handle); + assert(handle === self._handle, 'handle != self._handle'); timers.active(self); @@ -722,7 +722,7 @@ function afterConnect(status, handle, req, readable, writable) { return; } - assert.equal(handle, self._handle); + assert(handle === self._handle, 'handle != self._handle'); debug('afterConnect');