Skip to content

Commit 8c122f6

Browse files
author
root
committedDec 22, 2015
Lint fixes
1 parent 4adf44c commit 8c122f6

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed
 

‎lib/client.js

+2-10
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ var Client = function(clientId, clientKey, options, callback) {
3232

3333
this.server = null;
3434

35-
this.init(clientId, clientKey, options, callback);
35+
this.init(clientId, clientKey, options);
3636

3737
if (callback) {
3838
this.connect(callback);
@@ -47,19 +47,11 @@ inherits(Client, events.EventEmitter);
4747
* @param string clientId
4848
* @param string clientKey
4949
* @param object options
50-
* @param function callback
5150
*/
5251
Client.prototype.init = function(clientId, clientKey, options) {
5352

5453
options = options || {};
5554

56-
if (typeof options === 'function') {
57-
callback = options;
58-
options = {};
59-
} else if (typeof clientKey === 'function') {
60-
callback = clientKey;
61-
options = {};
62-
}
6355
if (typeof clientKey === 'object') {
6456
options = clientKey;
6557
clientKey = undefined;
@@ -101,7 +93,7 @@ Client.prototype.connect = function(callback) {
10193
self.emit('connect', self);
10294
}
10395
);
104-
this.server.on('error', function(err, type) {
96+
this.server.on('error', function(err) {
10597
self.emit('error', 'Error: '+err);
10698
});
10799
this.server.on('error.network', function(err) {

‎lib/connection.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
* Connection
33
*/
44

5-
var crypto = require('crypto');
65
var inherits = require('util').inherits;
76
var events = require('events');
87
var tls = require('tls');
@@ -58,7 +57,7 @@ Connection.prototype.connect = function(callback) {
5857
host: this.host,
5958
port: this.port,
6059
rejectUnauthorized: this.options.verifyCert === false ? false : true
61-
}, function(stream) {
60+
}, function() {
6261
self.connected = true;
6362
self.flushRequestBuffer();
6463
callback && callback(self);
@@ -79,7 +78,7 @@ Connection.prototype.connect = function(callback) {
7978
* ...
8079
* @param function response (last argument)
8180
*/
82-
Connection.prototype.request = function(method) {
81+
Connection.prototype.request = function() {
8382

8483
// Copy args to avoid leaking
8584
var args = new Array(arguments.length);

0 commit comments

Comments
 (0)
Please sign in to comment.