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