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
2dab5015
Commit
2dab5015
authored
Mar 22, 2020
by
Yossi Gottlieb
Browse files
Fix crashes related to failed/rejected accepts.
parent
4c08ae3f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/networking.c
View file @
2dab5015
...
...
@@ -786,7 +786,7 @@ void clientAcceptHandler(connection *conn) {
serverLog
(
LL_WARNING
,
"Error accepting a client connection: %s"
,
connGetLastError
(
conn
));
freeClient
(
c
);
freeClient
Async
(
c
);
return
;
}
...
...
@@ -828,7 +828,7 @@ void clientAcceptHandler(connection *conn) {
/* Nothing to do, Just to avoid the warning... */
}
server
.
stat_rejected_conn
++
;
freeClient
(
c
);
freeClient
Async
(
c
);
return
;
}
}
...
...
@@ -887,9 +887,10 @@ static void acceptCommonHandler(connection *conn, int flags, char *ip) {
*/
if
(
connAccept
(
conn
,
clientAcceptHandler
)
==
C_ERR
)
{
char
conninfo
[
100
];
serverLog
(
LL_WARNING
,
"Error accepting a client connection: %s (conn: %s)"
,
connGetLastError
(
conn
),
connGetInfo
(
conn
,
conninfo
,
sizeof
(
conninfo
)));
if
(
connGetState
(
conn
)
==
CONN_STATE_ERROR
)
serverLog
(
LL_WARNING
,
"Error accepting a client connection: %s (conn: %s)"
,
connGetLastError
(
conn
),
connGetInfo
(
conn
,
conninfo
,
sizeof
(
conninfo
)));
freeClient
(
connGetPrivateData
(
conn
));
return
;
}
...
...
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