@@ -46,7 +46,7 @@ RedisClient.prototype.select = RedisClient.prototype.SELECT = function select (d
4646} ;
4747
4848Multi . prototype . select = Multi . prototype . SELECT = function select ( db , callback ) {
49- this . queue . push ( [ 'select' , [ db ] , select_callback ( this . _client , db , callback ) ] ) ;
49+ this . queue . push ( [ 'select' , [ db ] , select_callback ( this . _client , db , callback ) , undefined , this . cur_command_ret_buf ] ) ;
5050 return this ;
5151} ;
5252
@@ -68,7 +68,7 @@ RedisClient.prototype.monitor = RedisClient.prototype.MONITOR = function monitor
6868Multi . prototype . monitor = Multi . prototype . MONITOR = function monitor ( callback ) {
6969 // Use a individual command, as this is a special case that does not has to be checked for any other command
7070 if ( this . exec !== this . exec_transaction ) {
71- this . queue . push ( [ 'monitor' , [ ] , monitor_callback ( this . _client , callback ) ] ) ;
71+ this . queue . push ( [ 'monitor' , [ ] , monitor_callback ( this . _client , callback ) , undefined , this . cur_command_ret_buf ] ) ;
7272 return this ;
7373 }
7474 // Set multi monitoring to indicate the exec that it should abort
@@ -115,7 +115,7 @@ Multi.prototype.QUIT = Multi.prototype.quit = function (callback) {
115115 self . closing = true ;
116116 self . ready = false ;
117117 } ;
118- this . queue . push ( [ 'quit' , [ ] , quit_callback ( self , callback ) , call_on_write ] ) ;
118+ this . queue . push ( [ 'quit' , [ ] , quit_callback ( self , callback ) , call_on_write , this . cur_command_ret_buf ] ) ;
119119 return this ;
120120} ;
121121
@@ -174,7 +174,7 @@ Multi.prototype.info = Multi.prototype.INFO = function info (section, callback)
174174 } else if ( section !== undefined ) {
175175 args = Array . isArray ( section ) ? section : [ section ] ;
176176 }
177- this . queue . push ( [ 'info' , args , info_callback ( this . _client , callback ) ] ) ;
177+ this . queue . push ( [ 'info' , args , info_callback ( this . _client , callback ) , undefined , this . cur_command_ret_buf ] ) ;
178178 return this ;
179179} ;
180180
@@ -216,7 +216,7 @@ Multi.prototype.auth = Multi.prototype.AUTH = function auth (pass, callback) {
216216
217217 // Stash auth for connect and reconnect.
218218 this . auth_pass = pass ;
219- this . queue . push ( [ 'auth' , [ pass ] , auth_callback ( this . _client , callback ) ] ) ;
219+ this . queue . push ( [ 'auth' , [ pass ] , auth_callback ( this . _client , callback ) , undefined , this . cur_command_ret_buf ] ) ;
220220 return this ;
221221} ;
222222
@@ -307,7 +307,7 @@ Multi.prototype.client = Multi.prototype.CLIENT = function client () {
307307 } ;
308308 }
309309 }
310- this . queue . push ( [ 'client' , arr , callback , call_on_write ] ) ;
310+ this . queue . push ( [ 'client' , arr , callback , call_on_write , undefined , this . cur_command_ret_buf ] ) ;
311311 return this ;
312312} ;
313313
@@ -386,7 +386,7 @@ Multi.prototype.hmset = Multi.prototype.HMSET = function hmset () {
386386 arr [ i ] = arguments [ i ] ;
387387 }
388388 }
389- this . queue . push ( [ 'hmset' , arr , callback ] ) ;
389+ this . queue . push ( [ 'hmset' , arr , callback ] , undefined , this . cur_command_ret_buf ) ;
390390 return this ;
391391} ;
392392
@@ -441,7 +441,7 @@ Multi.prototype.subscribe = Multi.prototype.SUBSCRIBE = function subscribe () {
441441 var call_on_write = function ( ) {
442442 self . pub_sub_mode = self . pub_sub_mode || self . command_queue . length + 1 ;
443443 } ;
444- this . queue . push ( [ 'subscribe' , arr , callback , call_on_write ] ) ;
444+ this . queue . push ( [ 'subscribe' , arr , callback , call_on_write , this . cur_command_ret_buf ] ) ;
445445 return this ;
446446} ;
447447
@@ -498,7 +498,7 @@ Multi.prototype.unsubscribe = Multi.prototype.UNSUBSCRIBE = function unsubscribe
498498 // Pub sub has to be activated even if not in pub sub mode, as the return value is manipulated in the callback
499499 self . pub_sub_mode = self . pub_sub_mode || self . command_queue . length + 1 ;
500500 } ;
501- this . queue . push ( [ 'unsubscribe' , arr , callback , call_on_write ] ) ;
501+ this . queue . push ( [ 'unsubscribe' , arr , callback , call_on_write , this . cur_command_ret_buf ] ) ;
502502 return this ;
503503} ;
504504
@@ -553,7 +553,7 @@ Multi.prototype.psubscribe = Multi.prototype.PSUBSCRIBE = function psubscribe ()
553553 var call_on_write = function ( ) {
554554 self . pub_sub_mode = self . pub_sub_mode || self . command_queue . length + 1 ;
555555 } ;
556- this . queue . push ( [ 'psubscribe' , arr , callback , call_on_write ] ) ;
556+ this . queue . push ( [ 'psubscribe' , arr , callback , call_on_write , this . cur_command_ret_buf ] ) ;
557557 return this ;
558558} ;
559559
@@ -610,6 +610,6 @@ Multi.prototype.punsubscribe = Multi.prototype.PUNSUBSCRIBE = function punsubscr
610610 // Pub sub has to be activated even if not in pub sub mode, as the return value is manipulated in the callback
611611 self . pub_sub_mode = self . pub_sub_mode || self . command_queue . length + 1 ;
612612 } ;
613- this . queue . push ( [ 'punsubscribe' , arr , callback , call_on_write ] ) ;
613+ this . queue . push ( [ 'punsubscribe' , arr , callback , call_on_write , this . cur_command_ret_buf ] ) ;
614614 return this ;
615615} ;
0 commit comments