This repository was archived by the owner on Dec 24, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-26
lines changed Expand file tree Collapse file tree 2 files changed +4
-26
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public List<long> ReadAllAsInts()
24
24
var results = new List < long > ( ) ;
25
25
while ( cmdCount -- > 0 )
26
26
{
27
- results . Add ( client . ReadInt ( ) ) ;
27
+ results . Add ( client . ReadLong ( ) ) ;
28
28
}
29
29
30
30
return results ;
Original file line number Diff line number Diff line change @@ -415,6 +415,7 @@ public bool FlushSendBuffer()
415
415
}
416
416
}
417
417
}
418
+
418
419
ResetSendBuffer ( ) ;
419
420
}
420
421
catch ( IOException ex ) // several stream commands wrap SocketException in IOException
@@ -481,12 +482,12 @@ protected long SendExpectLong(params byte[][] cmdWithBinaryArgs)
481
482
482
483
if ( Pipeline != null )
483
484
{
484
- Pipeline . CompleteLongQueuedCommand ( ReadInt ) ;
485
+ Pipeline . CompleteLongQueuedCommand ( ReadLong ) ;
485
486
return default ( long ) ;
486
487
}
487
488
return ReadLong ( ) ;
488
489
}
489
-
490
+
490
491
protected byte [ ] SendExpectData ( params byte [ ] [ ] cmdWithBinaryArgs )
491
492
{
492
493
if ( ! SendCommand ( cmdWithBinaryArgs ) )
@@ -682,29 +683,6 @@ internal void ExpectQueued()
682
683
ExpectWord ( QUEUED ) ;
683
684
}
684
685
685
- public long ReadInt ( )
686
- {
687
- int c = SafeReadByte ( ) ;
688
- if ( c == - 1 )
689
- throw CreateResponseError ( "No more data" ) ;
690
-
691
- var s = ReadLine ( ) ;
692
-
693
- if ( log . IsDebugEnabled )
694
- Log ( "R: {0}" , s ) ;
695
-
696
- if ( c == '-' )
697
- throw CreateResponseError ( s . StartsWith ( "ERR" ) ? s . Substring ( 4 ) : s ) ;
698
-
699
- if ( c == ':' || c == '$' ) //really strange why ZRANK needs the '$' here
700
- {
701
- int i ;
702
- if ( int . TryParse ( s , out i ) )
703
- return i ;
704
- }
705
- throw CreateResponseError ( "Unknown reply on integer response: " + c + s ) ;
706
- }
707
-
708
686
public long ReadLong ( )
709
687
{
710
688
int c = SafeReadByte ( ) ;
You can’t perform that action at this time.
0 commit comments