diff --git a/lib/driver.js b/lib/driver.js index 973bb54..feb4245 100644 --- a/lib/driver.js +++ b/lib/driver.js @@ -31,8 +31,12 @@ var Driver = module.exports = function Driver(opts) { Utils.subclass(Driver, Basestar); -Driver.prototype.setupCommands = function(commands) { - this.proxyMethods(commands, this.connection, this); +Driver.prototype.setupCommands = function(commands, proxy) { + if (proxy == null) { + proxy = this.connection; + } + + this.proxyMethods(commands, proxy, this); for (var i = 0; i < commands.length; i++) { var command = commands[i];