fixed retry logic for secure connect and accept #4750
This commit is contained in:
parent
c7a4ab8fb7
commit
2df88e07c4
|
@ -299,6 +299,7 @@ SecureSocket::secureAccept(int socket)
|
||||||
LOG((CLOG_INFO "client connection may not be secure"));
|
LOG((CLOG_INFO "client connection may not be secure"));
|
||||||
m_secureReady = false;
|
m_secureReady = false;
|
||||||
ARCH->sleep(1);
|
ARCH->sleep(1);
|
||||||
|
retry = 0;
|
||||||
return -1; // Failed, error out
|
return -1; // Failed, error out
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -342,6 +343,7 @@ SecureSocket::secureConnect(int socket)
|
||||||
|
|
||||||
if (isFatal()) {
|
if (isFatal()) {
|
||||||
LOG((CLOG_ERR "failed to connect secure socket"));
|
LOG((CLOG_ERR "failed to connect secure socket"));
|
||||||
|
retry = 0;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -352,6 +354,7 @@ SecureSocket::secureConnect(int socket)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
retry = 0;
|
||||||
// No error, set ready, process and return ok
|
// No error, set ready, process and return ok
|
||||||
m_secureReady = true;
|
m_secureReady = true;
|
||||||
if (verifyCertFingerprint()) {
|
if (verifyCertFingerprint()) {
|
||||||
|
@ -623,7 +626,7 @@ SecureSocket::serviceAccept(ISocketMultiplexerJob* job,
|
||||||
#elif SYSAPI_UNIX
|
#elif SYSAPI_UNIX
|
||||||
status = secureAccept(getSocket()->m_fd);
|
status = secureAccept(getSocket()->m_fd);
|
||||||
#endif
|
#endif
|
||||||
|
LOG((CLOG_ERR "DELME: status:%d",status));
|
||||||
// If status < 0, error happened
|
// If status < 0, error happened
|
||||||
if (status < 0) {
|
if (status < 0) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue