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
0231deb4
Commit
0231deb4
authored
Jul 13, 2015
by
Marc Gravell
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'deepakverma-master'
parents
04075c95
824567f4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletion
+23
-1
PhysicalConnection.cs
...kExchange.Redis/StackExchange/Redis/PhysicalConnection.cs
+10
-1
RedisTransaction.cs
StackExchange.Redis/StackExchange/Redis/RedisTransaction.cs
+13
-0
No files found.
StackExchange.Redis/StackExchange/Redis/PhysicalConnection.cs
View file @
0231deb4
...
@@ -949,7 +949,16 @@ private RawResult ReadArray(byte[] buffer, ref int offset, ref int count)
...
@@ -949,7 +949,16 @@ private RawResult ReadArray(byte[] buffer, ref int offset, ref int count)
if
(!
itemCount
.
TryGetInt64
(
out
i64
))
throw
ExceptionFactory
.
ConnectionFailure
(
multiplexer
.
IncludeDetailInExceptions
,
ConnectionFailureType
.
ProtocolFailure
,
"Invalid array length"
,
bridge
.
ServerEndPoint
);
if
(!
itemCount
.
TryGetInt64
(
out
i64
))
throw
ExceptionFactory
.
ConnectionFailure
(
multiplexer
.
IncludeDetailInExceptions
,
ConnectionFailureType
.
ProtocolFailure
,
"Invalid array length"
,
bridge
.
ServerEndPoint
);
int
itemCountActual
=
checked
((
int
)
i64
);
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
];
var
arr
=
new
RawResult
[
itemCountActual
];
for
(
int
i
=
0
;
i
<
itemCountActual
;
i
++)
for
(
int
i
=
0
;
i
<
itemCountActual
;
i
++)
...
...
StackExchange.Redis/StackExchange/Redis/RedisTransaction.cs
View file @
0231deb4
...
@@ -417,6 +417,19 @@ protected override bool SetResultCore(PhysicalConnection connection, Message mes
...
@@ -417,6 +417,19 @@ protected override bool SetResultCore(PhysicalConnection connection, Message mes
SetResult
(
message
,
false
);
SetResult
(
message
,
false
);
return
true
;
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
;
break
;
case
ResultType
.
MultiBulk
:
case
ResultType
.
MultiBulk
:
if
(!
tran
.
IsAborted
)
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