Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
3be89312
Commit
3be89312
authored
Mar 04, 2013
by
antirez
Browse files
Make sure replicationSetMaster() works when ip argument is not an sds.
parent
b8a28bf4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/replication.c
View file @
3be89312
...
...
@@ -1229,7 +1229,7 @@ int cancelReplicationHandshake(void) {
/* Set replication to the specified master address and port. */
void
replicationSetMaster
(
char
*
ip
,
int
port
)
{
sdsfree
(
server
.
masterhost
);
server
.
masterhost
=
sds
dup
(
ip
);
server
.
masterhost
=
sds
new
(
ip
);
server
.
masterport
=
port
;
if
(
server
.
master
)
freeClient
(
server
.
master
);
disconnectSlaves
();
/* Force our slaves to resync with us as well. */
...
...
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