mirror of https://github.com/nodejs/node.git
net: account encoding in .byteLength
parent
e8c01739cd
commit
ff32ecd5bf
|
@ -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…
Reference in New Issue