mirror of
https://github.com/debauchee/barrier.git
synced 2024-11-23 09:43:24 +03:00
Added code to test for and error out of max retry condition #4650
This commit is contained in:
parent
1af9d58a9b
commit
ad86041433
@ -378,8 +378,8 @@ SecureSocket::checkResult(int n, bool& fatal, int& retry)
|
||||
case SSL_ERROR_WANT_WRITE:
|
||||
case SSL_ERROR_WANT_CONNECT:
|
||||
case SSL_ERROR_WANT_ACCEPT:
|
||||
LOG((CLOG_DEBUG2 "need to retry the same SSL function"));
|
||||
retry += 1;
|
||||
LOG((CLOG_DEBUG2 "need to retry the same SSL function retry:%d", retry));
|
||||
break;
|
||||
|
||||
case SSL_ERROR_SYSCALL:
|
||||
@ -413,6 +413,12 @@ SecureSocket::checkResult(int n, bool& fatal, int& retry)
|
||||
break;
|
||||
}
|
||||
|
||||
// If the retry max would exceed the allowed, treat it as a fatal error
|
||||
if (retry > maxRetry()) {
|
||||
LOG((CLOG_ERR "Maximum retry count exceeded:%d",retry));
|
||||
fatal = true;
|
||||
}
|
||||
|
||||
if (fatal) {
|
||||
retry = 0;
|
||||
showError();
|
||||
|
Loading…
Reference in New Issue
Block a user