Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Lint blizzard module.

  • Loading branch information...
commit 94536ec0debd1b0fede0a110b9093cc49d9e965f 1 parent 5f1c6d6
@reid reid authored
Showing with 5 additions and 4 deletions.
  1. +5 −4 lib/blizzard/index.js
View
9 lib/blizzard/index.js
@@ -93,9 +93,9 @@ Blizzard.prototype.serverUpgrade = function (req, socket) {
return false;
}
- if (!version || version != 1) {
+ if (!version || Number(version) !== 1) {
return false;
- };
+ }
socket.write([
"HTTP/1.1 101 Welcome to " + this.PROTOCOL,
@@ -121,7 +121,8 @@ Blizzard.prototype.serverUpgrade = function (req, socket) {
*/
Blizzard.prototype.connect = function (url, cb) {
var host = "127.0.0.1",
- port = 5060;
+ port = 5060,
+ req;
if ("function" === typeof url) {
// Callback provided as first argument.
@@ -151,7 +152,7 @@ Blizzard.prototype.connect = function (url, cb) {
}
}
- var req = http.request({
+ req = http.request({
path: "/",
host: host,
port: port,
Please sign in to comment.
Something went wrong with that request. Please try again.