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
c1423c01
Commit
c1423c01
authored
Sep 22, 2020
by
yixiang
Committed by
Oran Agra
Oct 27, 2020
Browse files
Fix connGetSocketError usage (#7811)
(cherry picked from commit
b96c3595
)
parent
ecf51b0b
Changes
2
Show whitespace changes
Inline
Side-by-side
src/connection.c
View file @
c1423c01
...
...
@@ -261,8 +261,9 @@ static void connSocketEventHandler(struct aeEventLoop *el, int fd, void *clientD
if
(
conn
->
state
==
CONN_STATE_CONNECTING
&&
(
mask
&
AE_WRITABLE
)
&&
conn
->
conn_handler
)
{
if
(
connGetSocketError
(
conn
))
{
conn
->
last_errno
=
errno
;
int
conn_error
=
connGetSocketError
(
conn
);
if
(
conn_error
)
{
conn
->
last_errno
=
conn_error
;
conn
->
state
=
CONN_STATE_ERROR
;
}
else
{
conn
->
state
=
CONN_STATE_CONNECTED
;
...
...
src/tls.c
View file @
c1423c01
...
...
@@ -464,8 +464,9 @@ static void tlsHandleEvent(tls_connection *conn, int mask) {
switch
(
conn
->
c
.
state
)
{
case
CONN_STATE_CONNECTING
:
if
(
connGetSocketError
((
connection
*
)
conn
))
{
conn
->
c
.
last_errno
=
errno
;
int
conn_error
=
connGetSocketError
((
connection
*
)
conn
);
if
(
conn_error
)
{
conn
->
c
.
last_errno
=
conn_error
;
conn
->
c
.
state
=
CONN_STATE_ERROR
;
}
else
{
if
(
!
(
conn
->
flags
&
TLS_CONN_FLAG_FD_SET
))
{
...
...
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