Skip to content
This repository has been archived by the owner on Mar 27, 2018. It is now read-only.

Commit

Permalink
Just a little linting.
Browse files Browse the repository at this point in the history
  • Loading branch information
miksago committed Apr 15, 2011
1 parent 4830499 commit 2a9c991
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/ws/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ var _events = require('../_events');
var Mixin = require('../lang/mixin');

var CLOSE_FRAME = new Buffer(2);
CLOSE_FRAME[0] = 0xFF;
CLOSE_FRAME[1] = 0x00;

CLOSE_FRAME[0] = 0xFF;
CLOSE_FRAME[1] = 0x00;

/*-----------------------------------------------
The Connection:
Expand Down Expand Up @@ -287,12 +288,12 @@ Connection.prototype.inspect = function() {
Connection.prototype.write = function(data) {
if (this._state === 4) {
var byteLen = Buffer.byteLength(data, 'utf8'),
bytes = new Buffer(byteLen+2);
bytes = new Buffer(byteLen + 2);

bytes[0] = 0x00;
bytes.write(data, 1, 'utf8');
bytes[byteLen + 1] = 0xFF;

return write(this, bytes);
} else {
debug(this.id, '\033[31mCould not send.');
Expand Down

0 comments on commit 2a9c991

Please sign in to comment.