Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Wrap lines at 80 characters.

  • Loading branch information...
commit fb2150fed908fce8e1382581bf3c3b092f888a3d 1 parent 11387f7
@Rush authored
View
3  lib/net.js
@@ -430,7 +430,8 @@ function onread(buffer, offset, length) {
Socket.prototype.setEncoding = function(encoding) {
var StringDecoder = require('string_decoder').StringDecoder; // lazy load
- this._decoder = encoding ? new StringDecoder(encoding) : null; // revert encoding if none provided
+ // set encoding or revert encoding if none provided
+ this._decoder = encoding ? new StringDecoder(encoding) : null;
};
View
3  test/simple/test-net-socket-set-encoding-revert.js
@@ -34,7 +34,8 @@ socket.setEncoding(null);
socket.on('connect', function() {
socket.on('data', function(data) {
- assert.ok(typeof data === 'object', 'Encoding expected to be disabled after "socket.setEncoding(null)"');
+ assert.ok(typeof data === 'object',
+ 'Encoding expected to be disabled after "socket.setEncoding(null)"');
socket.end();
server.close();
});
Please sign in to comment.
Something went wrong with that request. Please try again.