File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -118,15 +118,27 @@ RedisClient.prototype.flush_and_error = function (message) {
118
118
while ( this . offline_queue . length > 0 ) {
119
119
command_obj = this . offline_queue . shift ( ) ;
120
120
if ( typeof command_obj . callback === "function" ) {
121
- command_obj . callback ( message ) ;
121
+ try {
122
+ command_obj . callback ( message ) ;
123
+ } catch ( callback_err ) {
124
+ process . nextTick ( function ( ) {
125
+ throw callback_err ;
126
+ } ) ;
127
+ }
122
128
}
123
129
}
124
130
this . offline_queue = new Queue ( ) ;
125
131
126
132
while ( this . command_queue . length > 0 ) {
127
133
command_obj = this . command_queue . shift ( ) ;
128
134
if ( typeof command_obj . callback === "function" ) {
129
- command_obj . callback ( message ) ;
135
+ try {
136
+ command_obj . callback ( message ) ;
137
+ } catch ( callback_err ) {
138
+ process . nextTick ( function ( ) {
139
+ throw callback_err ;
140
+ } ) ;
141
+ }
130
142
}
131
143
}
132
144
this . command_queue = new Queue ( ) ;
You can’t perform that action at this time.
0 commit comments