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
12322121
Commit
12322121
authored
Aug 14, 2018
by
Marc Gravell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify EOF reporting
parent
3e5e3476
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
8 deletions
+17
-8
TestBase.cs
StackExchange.Redis.Tests/TestBase.cs
+1
-1
PhysicalConnection.cs
StackExchange.Redis/PhysicalConnection.cs
+16
-7
No files found.
StackExchange.Redis.Tests/TestBase.cs
View file @
12322121
...
...
@@ -307,7 +307,7 @@ protected IServer GetAnyMaster(ConnectionMultiplexer muxer)
if
(
complete
)
{
ActiveMultiplexers
.
Remove
(
handle
);
}
}
}
Writer
.
WriteLine
((
complete
?
"Closed ("
:
"Closing... ("
)
+
count
.
ToString
()
+
" remaining)"
);
...
...
StackExchange.Redis/PhysicalConnection.cs
View file @
12322121
...
...
@@ -1341,15 +1341,24 @@ private void OnDebugAbort()
// this CEX is just a hardcore "seriously, read the actual value" - there's no
// convenient "Thread.VolatileRead<T>(ref T field) where T : class", and I don't
// want to make the field volatile just for this one place that needs it
if
(
isReading
&&
Volatile
.
Read
(
ref
_ioPipe
)
==
null
)
if
(
isReading
)
{
// yeah, that's fine... don't worry about it
}
else
{
Trace
(
"Faulted"
);
RecordConnectionFailed
(
ConnectionFailureType
.
InternalFailure
,
ex
);
var
pipe
=
Volatile
.
Read
(
ref
_ioPipe
);
if
(
pipe
==
null
)
{
return
;
// yeah, that's fine... don't worry about it; we nuked it
}
// check for confusing read errors - no need to present "Reading is not allowed after reader was completed."
if
(
pipe
is
SocketConnection
sc
&&
sc
.
ShutdownKind
==
PipeShutdownKind
.
ReadEndOfStream
)
{
RecordConnectionFailed
(
ConnectionFailureType
.
SocketClosed
,
new
EndOfStreamException
());
return
;
}
}
Trace
(
"Faulted"
);
RecordConnectionFailed
(
ConnectionFailureType
.
InternalFailure
,
ex
);
}
}
...
...
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