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
cd044317
Commit
cd044317
authored
Feb 04, 2015
by
Marc Gravell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
typo; send the right message; also, try to do the PUBLISH *after* the slaveof
parent
4b3691a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
RedisServer.cs
StackExchange.Redis/StackExchange/Redis/RedisServer.cs
+4
-4
No files found.
StackExchange.Redis/StackExchange/Redis/RedisServer.cs
View file @
cd044317
...
...
@@ -568,7 +568,7 @@ public void SlaveOf(EndPoint endpoint, CommandFlags flags = CommandFlags.None)
throw
new
ArgumentException
(
"Cannot slave to self"
);
}
// prepare the actual slaveof message (not sent yet)
var
m
sg
=
CreateSlaveOfMessage
(
endpoint
,
flags
);
var
slaveofM
sg
=
CreateSlaveOfMessage
(
endpoint
,
flags
);
var
configuration
=
this
.
multiplexer
.
RawConfig
;
...
...
@@ -582,16 +582,16 @@ public void SlaveOf(EndPoint endpoint, CommandFlags flags = CommandFlags.None)
del
.
SetInternalCall
();
server
.
QueueDirectFireAndForget
(
del
,
ResultProcessor
.
Boolean
);
}
ExecuteSync
(
slaveofMsg
,
ResultProcessor
.
DemandOK
);
// attempt to broadcast a reconfigure message to anybody listening to this server
var
channel
=
this
.
multiplexer
.
ConfigurationChangedChannel
;
if
(
channel
!=
null
&&
this
.
multiplexer
.
CommandMap
.
IsAvailable
(
RedisCommand
.
PUBLISH
))
if
(
channel
!=
null
&&
this
.
multiplexer
.
CommandMap
.
IsAvailable
(
RedisCommand
.
PUBLISH
))
{
var
pub
=
Message
.
Create
(-
1
,
CommandFlags
.
FireAndForget
|
CommandFlags
.
NoRedirect
,
RedisCommand
.
PUBLISH
,
(
RedisValue
)
channel
,
RedisLiterals
.
Wildcard
);
pub
.
SetInternalCall
();
server
.
QueueDirectFireAndForget
(
msg
,
ResultProcessor
.
Int64
);
server
.
QueueDirectFireAndForget
(
pub
,
ResultProcessor
.
Int64
);
}
ExecuteSync
(
msg
,
ResultProcessor
.
DemandOK
);
}
public
Task
SlaveOfAsync
(
EndPoint
endpoint
,
CommandFlags
flags
=
CommandFlags
.
None
)
...
...
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