mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
patch from thunder to handle connexion break correctly, and therefore avoid false notification attempt of friend.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5807 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
7e08576c52
commit
9000cf9034
@ -403,23 +403,35 @@ int pqissllistenbase::continueSSL(IncomingSSLInfo& incoming_connexion_info, bool
|
||||
pqioutput(PQL_DEBUG_BASIC, pqissllistenzone, out);
|
||||
}
|
||||
|
||||
if ((ssl_err == SSL_ERROR_WANT_READ) ||
|
||||
(ssl_err == SSL_ERROR_WANT_WRITE))
|
||||
{
|
||||
std::string out = "pqissllistenbase::continueSSL() Connection Not Complete!\n";
|
||||
|
||||
if (addin)
|
||||
switch (ssl_err) {
|
||||
case SSL_ERROR_WANT_READ:
|
||||
case SSL_ERROR_WANT_WRITE:
|
||||
{
|
||||
out += "pqissllistenbase::continueSSL() Adding SSL to incoming!";
|
||||
std::string out = "pqissllistenbase::continueSSL() Connection Not Complete!\n";
|
||||
|
||||
// add to incomingqueue.
|
||||
incoming_ssl.push_back(incoming_connexion_info) ;
|
||||
if (addin)
|
||||
{
|
||||
out += "pqissllistenbase::continueSSL() Adding SSL to incoming!";
|
||||
|
||||
// add to incomingqueue.
|
||||
incoming_ssl.push_back(incoming_connexion_info) ;
|
||||
}
|
||||
|
||||
pqioutput(PQL_DEBUG_BASIC, pqissllistenzone, out);
|
||||
|
||||
// zero means still continuing....
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
case SSL_ERROR_SYSCALL:
|
||||
{
|
||||
std::string out = "pqissllistenbase::continueSSL() Connection failed!\n";
|
||||
pqioutput(PQL_DEBUG_BASIC, pqissllistenzone, out);
|
||||
|
||||
pqioutput(PQL_DEBUG_BASIC, pqissllistenzone, out);
|
||||
|
||||
// zero means still continuing....
|
||||
return 0;
|
||||
// basic-error while connecting, no security message needed
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
/* we have failed -> get certificate if possible */
|
||||
|
Loading…
Reference in New Issue
Block a user