Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
StackExchange.Redis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
StackExchange.Redis
Commits
a4f4e8ee
Commit
a4f4e8ee
authored
Dec 10, 2014
by
deepakv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
StackExchange.Redis to consider separately Response Array as either NULL or an Empty Array.
parent
d994b7ad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
3 deletions
+23
-3
PhysicalConnection.cs
...kExchange.Redis/StackExchange/Redis/PhysicalConnection.cs
+10
-3
RedisTransaction.cs
StackExchange.Redis/StackExchange/Redis/RedisTransaction.cs
+13
-0
No files found.
StackExchange.Redis/StackExchange/Redis/PhysicalConnection.cs
View file @
a4f4e8ee
...
...
@@ -877,9 +877,16 @@ private RawResult ReadArray(byte[] buffer, ref int offset, ref int count)
long
i64
;
if
(!
itemCount
.
TryGetInt64
(
out
i64
))
throw
ExceptionFactory
.
ConnectionFailure
(
multiplexer
.
IncludeDetailInExceptions
,
ConnectionFailureType
.
ProtocolFailure
,
"Invalid array length"
,
bridge
.
ServerEndPoint
);
int
itemCountActual
=
checked
((
int
)
i64
);
if
(
itemCountActual
<=
0
)
return
RawResult
.
EmptyArray
;
if
(
itemCountActual
<
0
)
{
//for null response by command like EXEC, RESP array: *-1\r\n
return
new
RawResult
(
ResultType
.
SimpleString
,
null
,
0
,
0
);
}
else
if
(
itemCountActual
==
0
)
{
//for zero array response by command like SCAN, Resp array: *0\r\n
return
RawResult
.
EmptyArray
;
}
var
arr
=
new
RawResult
[
itemCountActual
];
for
(
int
i
=
0
;
i
<
itemCountActual
;
i
++)
{
...
...
StackExchange.Redis/StackExchange/Redis/RedisTransaction.cs
View file @
a4f4e8ee
...
...
@@ -416,6 +416,19 @@ protected override bool SetResultCore(PhysicalConnection connection, Message mes
SetResult
(
message
,
false
);
return
true
;
}
//EXEC returned with a NULL
if
(!
tran
.
IsAborted
&&
result
.
IsNull
)
{
connection
.
Multiplexer
.
Trace
(
"Server aborted due to failed EXEC"
);
//cancel the commands in the transaction and mark them as complete with the completion manager
foreach
(
var
op
in
wrapped
)
{
op
.
Wrapped
.
Cancel
();
bridge
.
CompleteSyncOrAsync
(
op
.
Wrapped
);
}
SetResult
(
message
,
false
);
return
true
;
}
break
;
case
ResultType
.
MultiBulk
:
if
(!
tran
.
IsAborted
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment