Browse Source

lint

v0.10.5-release
isaacs 12 years ago
parent
commit
22c7d134e2
  1. 3
      lib/net.js

3
lib/net.js

@ -673,11 +673,12 @@ Socket.prototype.__defineGetter__('bytesWritten', function() {
bytes += Buffer.byteLength(el.chunk, el.encoding);
});
if (data)
if (data) {
if (Buffer.isBuffer(data))
bytes += data.length;
else
bytes += Buffer.byteLength(data, encoding);
}
return bytes;
});

Loading…
Cancel
Save