Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
b5423b09
Commit
b5423b09
authored
Jul 08, 2013
by
antirez
Browse files
Fix old anetPeerToString() API call in replication.c
parent
1e794922
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/redis.c
View file @
b5423b09
...
@@ -2882,8 +2882,6 @@ int main(int argc, char **argv) {
...
@@ -2882,8 +2882,6 @@ int main(int argc, char **argv) {
loadDataFromDisk
();
loadDataFromDisk
();
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 @
b5423b09
...
@@ -1594,10 +1594,10 @@ void replicationCron(void) {
...
@@ -1594,10 +1594,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