more verbose error messages on disconnect

This commit is contained in:
David Rose 2004-01-02 23:18:21 +00:00
parent cf6ba279f8
commit c5a0b25bc8
2 changed files with 19 additions and 0 deletions

View File

@ -164,6 +164,22 @@ underflow() {
<< _source->get_server_name() << ":"
<< _source->get_port() << " (" << read_count << ").\n";
notify_ssl_errors();
SSL *ssl;
BIO_get_ssl(*_source, &ssl);
if (ssl != (SSL *)NULL) {
downloader_cat.warning()
<< "OpenSSL error code: " << SSL_get_error(ssl, read_count)
<< "\n";
}
#ifdef WIN32_VC
downloader_cat.warning()
<< "Windows error code: " << WSAGetLastError() << "\n";
#else
downloader_cat.warning()
<< "Unix error code: " << errno << "\n";
#endif // WIN32_VC
}
gbump(num_bytes);
return EOF;

View File

@ -926,6 +926,9 @@ get_ssl_ctx() {
}
#endif
// Make sure the error strings are loaded.
notify_ssl_errors();
// Get the configured set of expected servers.
{
Config::ConfigTable::Symbol expected_servers;