Browse Source

net: account encoding in .byteLength

v0.10.4-release
Fedor Indutny 12 years ago
parent
commit
ff32ecd5bf
  1. 2
      lib/net.js

2
lib/net.js

@ -667,7 +667,7 @@ Socket.prototype.__defineGetter__('bytesWritten', function() {
encoding = this._pendingEncoding;
state.buffer.forEach(function(el) {
bytes += Buffer.byteLength(el.chunk);
bytes += Buffer.byteLength(el.chunk, el.encoding);
});
if (data)

Loading…
Cancel
Save