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
7a34d753
Commit
7a34d753
authored
Feb 04, 2020
by
mgravell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix #1342 - avoid race condition in exception processing
parent
92125519
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
ReleaseNotes.md
docs/ReleaseNotes.md
+1
-0
ServerEndPoint.cs
src/StackExchange.Redis/ServerEndPoint.cs
+6
-5
No files found.
docs/ReleaseNotes.md
View file @
7a34d753
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
-
add: support for
`HSTRLEN`
(#1241 via eitanhs)
-
add: support for
`HSTRLEN`
(#1241 via eitanhs)
-
add:
`GeoRadiusResult`
is now mockable (#1175 via firenero)
-
add:
`GeoRadiusResult`
is now mockable (#1175 via firenero)
-
fix: various documentation fixes (#1162, #1135, #1203, #1240, #1245, #1159, #1311, #1339)
-
fix: various documentation fixes (#1162, #1135, #1203, #1240, #1245, #1159, #1311, #1339)
-
fix: rare race-condition around exception data (#1342)
## 2.0.600
## 2.0.600
...
...
src/StackExchange.Redis/ServerEndPoint.cs
View file @
7a34d753
...
@@ -81,15 +81,16 @@ internal Exception LastException
...
@@ -81,15 +81,16 @@ internal Exception LastException
{
{
get
get
{
{
var
tmp1
=
interactive
;
var
snapshot
=
interactive
;
var
tmp2
=
subscription
;
var
subEx
=
subscription
?.
LastException
;
var
subExData
=
subEx
?.
Data
;
//check if subscription endpoint has a better lastexception
//check if subscription endpoint has a better lastexception
if
(
tmp2
?.
LastException
!=
null
&&
tmp2
.
LastException
.
Data
.
Contains
(
"Redis-FailureType"
)
&&
!
tmp2
.
LastException
.
Data
[
"Redis-FailureType"
].
ToString
().
Equals
(
nameof
(
ConnectionFailureType
.
UnableToConnect
)
))
if
(
subExData
!=
null
&&
subExData
.
Contains
(
"Redis-FailureType"
)
&&
subExData
[
"Redis-FailureType"
]?.
ToString
()
!=
nameof
(
ConnectionFailureType
.
UnableToConnect
))
{
{
return
tmp2
.
LastException
;
return
subEx
;
}
}
return
tmp1
?.
LastException
;
return
snapshot
?.
LastException
;
}
}
}
}
...
...
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