trying to fix autoversion in online mode

This commit is contained in:
Romain Beaumont 2017-07-09 13:21:54 +02:00
parent aa96950ac5
commit 2d4f4a05e1
No known key found for this signature in database
GPG Key ID: DB60E388B3BCF286
2 changed files with 3 additions and 0 deletions

View File

@ -53,6 +53,7 @@ module.exports = function(client, options) {
// Finished configuring client object, let connection proceed
client.emit('connect_allowed');
client.wait_connect = false;
});
return client;
};

View File

@ -19,6 +19,8 @@ module.exports=createClient;
function createClient(options) {
assert.ok(options, "options is required");
assert.ok(options.username, "username is required");
if(!options.version)
options.version=false;
// TODO: avoid setting default version if autoVersion is enabled
const optVersion = options.version || require("./version").defaultVersion;