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
90038906
Commit
90038906
authored
Jul 08, 2013
by
antirez
Browse files
Fix old anetPeerToString() API call in replication.c
parent
c76df730
Changes
2
Show whitespace changes
Inline
Side-by-side
src/redis.c
View file @
90038906
...
@@ -2975,8 +2975,6 @@ int main(int argc, char **argv) {
...
@@ -2975,8 +2975,6 @@ int main(int argc, char **argv) {
}
}
if
(
server
.
ipfd_count
>
0
)
if
(
server
.
ipfd_count
>
0
)
redisLog
(
REDIS_NOTICE
,
"The server is now ready to accept connections on port %d"
,
server
.
port
);
redisLog
(
REDIS_NOTICE
,
"The server is now ready to accept connections on port %d"
,
server
.
port
);
if
(
server
.
ip6fd
>
0
)
redisLog
(
REDIS_NOTICE
,
"The server is now ready to accept IPv6 connections on port %d"
,
server
.
port6
);
if
(
server
.
sofd
>
0
)
if
(
server
.
sofd
>
0
)
redisLog
(
REDIS_NOTICE
,
"The server is now ready to accept connections at %s"
,
server
.
unixsocket
);
redisLog
(
REDIS_NOTICE
,
"The server is now ready to accept connections at %s"
,
server
.
unixsocket
);
}
}
...
...
src/replication.c
View file @
90038906
...
@@ -1614,10 +1614,10 @@ void replicationCron(void) {
...
@@ -1614,10 +1614,10 @@ void replicationCron(void) {
if
(
slave
->
flags
&
REDIS_PRE_PSYNC_SLAVE
)
continue
;
if
(
slave
->
flags
&
REDIS_PRE_PSYNC_SLAVE
)
continue
;
if
((
server
.
unixtime
-
slave
->
repl_ack_time
)
>
server
.
repl_timeout
)
if
((
server
.
unixtime
-
slave
->
repl_ack_time
)
>
server
.
repl_timeout
)
{
{
char
ip
[
32
];
char
ip
[
REDIS_IP_STR_LEN
];
int
port
;
int
port
;
if
(
anetPeerToString
(
slave
->
fd
,
ip
,
&
port
)
!=
-
1
)
{
if
(
anetPeerToString
(
slave
->
fd
,
ip
,
sizeof
(
ip
),
&
port
)
!=
-
1
)
{
redisLog
(
REDIS_WARNING
,
redisLog
(
REDIS_WARNING
,
"Disconnecting timedout slave: %s:%d"
,
"Disconnecting timedout slave: %s:%d"
,
ip
,
slave
->
slave_listening_port
);
ip
,
slave
->
slave_listening_port
);
...
...
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