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
7906ad3b
Commit
7906ad3b
authored
Jul 23, 2018
by
Marc Gravell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
k server working; I was just being daft; still, might as well keep this Client.ID I added
parent
41204570
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
0 deletions
+4
-0
RedisConnectionHandler.cs
KestrelRedisServer/RedisConnectionHandler.cs
+1
-0
RedisClient.cs
StackExchange.Redis.Server/RedisClient.cs
+1
-0
RespServer.cs
StackExchange.Redis.Server/RespServer.cs
+2
-0
No files found.
KestrelRedisServer/RedisConnectionHandler.cs
View file @
7906ad3b
...
...
@@ -32,6 +32,7 @@ public override async Task OnConnectedAsync(ConnectionContext connection)
if
(!
makingProgress
&&
read
.
IsCompleted
)
break
;
}
}
catch
(
ConnectionResetException
)
{
}
// swallow
finally
{
_server
.
RemoveClient
(
client
);
...
...
StackExchange.Redis.Server/RedisClient.cs
View file @
7906ad3b
...
...
@@ -34,6 +34,7 @@ internal int Unsubscribe(RedisChannel channel)
public
string
Name
{
get
;
set
;
}
internal
IDuplexPipe
LinkedPipe
{
get
;
set
;
}
public
bool
Closed
{
get
;
internal
set
;
}
public
int
Id
{
get
;
internal
set
;
}
public
void
Dispose
()
{
...
...
StackExchange.Redis.Server/RespServer.cs
View file @
7906ad3b
...
...
@@ -206,11 +206,13 @@ public int ClientCount
get
{
lock
(
_clients
)
{
return
_clients
.
Count
;
}
}
}
public
int
TotalClientCount
{
get
;
private
set
;
}
private
int
_nextId
;
public
RedisClient
AddClient
()
{
var
client
=
CreateClient
();
lock
(
_clients
)
{
client
.
Id
=
++
_nextId
;
ThrowIfShutdown
();
_clients
.
Add
(
client
);
TotalClientCount
++;
...
...
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