Tweaked verbosity of lost connections in HTTP::Downloader and closed connections in Socket::SSLConnection.
This commit is contained in:
parent
26a5c53fa6
commit
29c8205e79
2 changed files with 6 additions and 2 deletions
|
@ -198,8 +198,11 @@ namespace HTTP{
|
||||||
retryCount - loop + 1, retryCount);
|
retryCount - loop + 1, retryCount);
|
||||||
getSocket().close();
|
getSocket().close();
|
||||||
}else{
|
}else{
|
||||||
FAIL_MSG("Lost connection while retrieving %s (%zu/%" PRIu32 ")", link.getUrl().c_str(),
|
if (retryCount - loop + 1 > 2){
|
||||||
retryCount - loop + 1, retryCount);
|
INFO_MSG("Lost connection while retrieving %s (%zu/%" PRIu32 ")", link.getUrl().c_str(), retryCount - loop + 1, retryCount);
|
||||||
|
}else{
|
||||||
|
MEDIUM_MSG("Lost connection while retrieving %s (%zu/%" PRIu32 ")", link.getUrl().c_str(), retryCount - loop + 1, retryCount);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Util::sleep(500); // wait a bit before retrying
|
Util::sleep(500); // wait a bit before retrying
|
||||||
}
|
}
|
||||||
|
|
|
@ -1013,6 +1013,7 @@ int Socket::SSLConnection::iread(void *buffer, int len, int flags){
|
||||||
}
|
}
|
||||||
if (r < 0){
|
if (r < 0){
|
||||||
switch (errno){
|
switch (errno){
|
||||||
|
case MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY: close(); return 0; break;
|
||||||
case MBEDTLS_ERR_SSL_WANT_WRITE: return 0; break;
|
case MBEDTLS_ERR_SSL_WANT_WRITE: return 0; break;
|
||||||
case MBEDTLS_ERR_SSL_WANT_READ: return 0; break;
|
case MBEDTLS_ERR_SSL_WANT_READ: return 0; break;
|
||||||
case EWOULDBLOCK: return 0; break;
|
case EWOULDBLOCK: return 0; break;
|
||||||
|
|
Loading…
Add table
Reference in a new issue