mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-08 00:55:13 -04:00
Fixes for failed Proxy Connection Attempts:
- create Timeout Fn so it can be called by classes derived from pqissl. - set HIDDEN timeout to 30 seconds. - add reset_locked() calls on errors in pqisslproxy. git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-initdev@7039 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
45bd72203e
commit
06a582564d
6 changed files with 36 additions and 22 deletions
|
@ -823,13 +823,8 @@ int pqissl::Initiate_Connection()
|
|||
*
|
||||
*/
|
||||
|
||||
int pqissl::Basic_Connection_Complete()
|
||||
bool pqissl::CheckConnectionTimeout()
|
||||
{
|
||||
#ifdef PQISSL_LOG_DEBUG
|
||||
rslog(RSL_DEBUG_BASIC, pqisslzone,
|
||||
"pqissl::Basic_Connection_Complete()...");
|
||||
#endif
|
||||
|
||||
/* new TimeOut code. */
|
||||
if (time(NULL) > mTimeoutTS)
|
||||
{
|
||||
|
@ -841,10 +836,26 @@ int pqissl::Basic_Connection_Complete()
|
|||
|
||||
rslog(RSL_ALERT, pqisslzone, "pqissl::Basic_Connection_Complete() -> calling reset()");
|
||||
reset_locked();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int pqissl::Basic_Connection_Complete()
|
||||
{
|
||||
#ifdef PQISSL_LOG_DEBUG
|
||||
rslog(RSL_DEBUG_BASIC, pqisslzone,
|
||||
"pqissl::Basic_Connection_Complete()...");
|
||||
#endif
|
||||
|
||||
if (CheckConnectionTimeout())
|
||||
{
|
||||
// calls reset.
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
if (waiting != WAITING_SOCK_CONNECT)
|
||||
{
|
||||
rslog(RSL_ALERT, pqisslzone,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue