File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -269,7 +269,6 @@ function JavascriptRedisParser (options) {
269269JavascriptRedisParser . prototype . execute = function ( buffer ) {
270270 if ( this . buffer === null ) {
271271 this . buffer = buffer
272- this . offset = 0
273272 } else if ( this . bigStrSize === 0 ) {
274273 var oldLength = this . buffer . length
275274 var remainingLength = oldLength - this . offset
@@ -278,7 +277,6 @@ JavascriptRedisParser.prototype.execute = function (buffer) {
278277 this . buffer . copy ( newBuffer , 0 , this . offset , oldLength )
279278 buffer . copy ( newBuffer , remainingLength , 0 , buffer . length )
280279 this . buffer = newBuffer
281- this . offset = 0
282280 } else if ( this . totalChunkSize + buffer . length >= this . bigStrSize ) {
283281 this . bufferCache . push ( buffer )
284282 if ( this . offset !== 0 ) {
@@ -288,16 +286,15 @@ JavascriptRedisParser.prototype.execute = function (buffer) {
288286 this . bigStrSize = 0
289287 this . totalChunkSize = 0
290288 this . bufferCache = [ ]
291- this . offset = 0
292289 } else {
293290 this . bufferCache . push ( buffer )
294291 this . totalChunkSize += buffer . length
295292 return
296293 }
297294
298- var length = this . buffer . length
295+ this . offset = 0
299296
300- while ( this . offset < length ) {
297+ while ( this . offset < this . buffer . length ) {
301298 var offset = this . offset
302299 var type = this . buffer [ this . offset ++ ]
303300 var response = parseType ( this , type )
You can’t perform that action at this time.
0 commit comments