Add ability to pass proxy
This commit is contained in:
parent
df60282042
commit
ffc27f9942
|
@ -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];
|
||||
|
|
Loading…
Reference in New Issue