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
221fac32
Commit
221fac32
authored
Aug 13, 2018
by
Marc Gravell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
KeepAlive shouldn't bother if the conneciton is already busy
parent
ea46109b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
PhysicalBridge.cs
StackExchange.Redis/PhysicalBridge.cs
+2
-0
PhysicalConnection.cs
StackExchange.Redis/PhysicalConnection.cs
+4
-0
No files found.
StackExchange.Redis/PhysicalBridge.cs
View file @
221fac32
...
...
@@ -235,6 +235,8 @@ internal void IncrementOpCount()
internal
void
KeepAlive
()
{
if
(!(
physical
?.
IsIdle
()
??
false
))
return
;
// don't pile on if already doing something
var
commandMap
=
Multiplexer
.
CommandMap
;
Message
msg
=
null
;
var
features
=
ServerEndPoint
.
GetFeatures
();
...
...
StackExchange.Redis/PhysicalConnection.cs
View file @
221fac32
...
...
@@ -415,6 +415,8 @@ void add(string lk, string sk, string v)
Shutdown
();
}
internal
bool
IsIdle
()
=>
_writeStatus
==
WriteStatus
.
Idle
;
internal
void
SetIdle
()
=>
_writeStatus
=
WriteStatus
.
Idle
;
internal
void
SetWriting
()
=>
_writeStatus
=
WriteStatus
.
Writing
;
...
...
@@ -428,6 +430,8 @@ private enum WriteStatus
Flushed
,
}
/// <summary>Returns a string that represents the current object.</summary>
/// <returns>A string that represents the current object.</returns>
public
override
string
ToString
()
=>
$"
{
physicalName
}
(
{
_writeStatus
}
)"
;
internal
static
void
IdentifyFailureType
(
Exception
exception
,
ref
ConnectionFailureType
failureType
)
...
...
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