mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-15 10:54:22 -05:00
Revert "Revert "add a quiet shutdown when SSL_ERROR_SYSCALL is raised""
This reverts commit 5f9020b2b69a1920f5886a3ec25a2591902d17ae. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1900 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
225cee6627
commit
2ed7a96245
@ -96,7 +96,7 @@ pqissl::pqissl(pqissllistener *l, PQInterface *parent, p3AuthMgr *am, p3ConnectM
|
|||||||
net_attempt(0), net_failure(0), net_unreachable(0),
|
net_attempt(0), net_failure(0), net_unreachable(0),
|
||||||
sameLAN(false), n_read_zero(0),
|
sameLAN(false), n_read_zero(0),
|
||||||
mConnectDelay(0), mConnectTS(0),
|
mConnectDelay(0), mConnectTS(0),
|
||||||
mConnectTimeout(0), mTimeoutTS(0),
|
mConnectTimeout(0), mTimeoutTS(0), quietShutdown(false),
|
||||||
|
|
||||||
/**************** PQI_USE_XPGP ******************/
|
/**************** PQI_USE_XPGP ******************/
|
||||||
#if defined(PQI_USE_XPGP)
|
#if defined(PQI_USE_XPGP)
|
||||||
@ -213,14 +213,19 @@ int pqissl::reset()
|
|||||||
out << "\tssl_con: " << ssl_connection << std::endl;
|
out << "\tssl_con: " << ssl_connection << std::endl;
|
||||||
out << std::endl;
|
out << std::endl;
|
||||||
|
|
||||||
bool neededReset = false;
|
bool neededReset = false;
|
||||||
|
|
||||||
if (ssl_connection != NULL)
|
if (ssl_connection != NULL && sockfd > 0)
|
||||||
{
|
{
|
||||||
out << "pqissl::reset() Shutting down SSL Connection";
|
out << "pqissl::reset() Shutting down SSL Connection";
|
||||||
out << std::endl;
|
out << std::endl;
|
||||||
SSL_shutdown(ssl_connection);
|
if (quietShutdown) {
|
||||||
|
ssl_connection->quiet_shutdown;
|
||||||
|
} else {
|
||||||
|
SSL_shutdown(ssl_connection);
|
||||||
|
}
|
||||||
|
|
||||||
|
quietShutdown = false;
|
||||||
neededReset = true;
|
neededReset = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1374,6 +1379,7 @@ int pqissl::senddata(void *data, int len)
|
|||||||
out << std::endl;
|
out << std::endl;
|
||||||
std::cerr << out.str() ;
|
std::cerr << out.str() ;
|
||||||
rslog(RSL_ALERT, pqisslzone, out.str());
|
rslog(RSL_ALERT, pqisslzone, out.str());
|
||||||
|
quietShutdown = true;
|
||||||
reset();
|
reset();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -1493,7 +1499,8 @@ int pqissl::readdata(void *data, int len)
|
|||||||
out << "Socket Closed Abruptly.... Resetting PQIssl";
|
out << "Socket Closed Abruptly.... Resetting PQIssl";
|
||||||
out << std::endl;
|
out << std::endl;
|
||||||
rslog(RSL_ALERT, pqisslzone, out.str());
|
rslog(RSL_ALERT, pqisslzone, out.str());
|
||||||
reset();
|
quietShutdown = true;
|
||||||
|
reset();
|
||||||
std::cerr << out.str() << std::endl ;
|
std::cerr << out.str() << std::endl ;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -203,6 +203,7 @@ virtual int net_internal_fcntl_nonblock(int fd) { return unix_fcntl_nonblock(fd)
|
|||||||
time_t mConnectTS;
|
time_t mConnectTS;
|
||||||
uint32_t mConnectTimeout;
|
uint32_t mConnectTimeout;
|
||||||
time_t mTimeoutTS;
|
time_t mTimeoutTS;
|
||||||
|
bool quietShutdown;
|
||||||
|
|
||||||
/* Need Certificate specific functions here! */
|
/* Need Certificate specific functions here! */
|
||||||
/**************** PQI_USE_XPGP ******************/
|
/**************** PQI_USE_XPGP ******************/
|
||||||
|
Loading…
Reference in New Issue
Block a user