mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
stop sending data when ssl read returns 0
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1922 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
d09fdd1e91
commit
1bb1f4575b
@ -1475,7 +1475,7 @@ int pqissl::readdata(void *data, int len)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
++n_read_zero;
|
++n_read_zero;
|
||||||
out << "SSL_ERROR_ZERO_RETURN -- ";
|
out << "ssl read : SSL_ERROR_ZERO_RETURN -- Blocking the writing process while waiting for more information.";
|
||||||
out << std::endl;
|
out << std::endl;
|
||||||
out << " Has socket closed been properly closed? nReadZero: " << n_read_zero;
|
out << " Has socket closed been properly closed? nReadZero: " << n_read_zero;
|
||||||
out << std::endl;
|
out << std::endl;
|
||||||
@ -1483,6 +1483,7 @@ int pqissl::readdata(void *data, int len)
|
|||||||
if (PQISSL_MAX_READ_ZERO_COUNT < n_read_zero)
|
if (PQISSL_MAX_READ_ZERO_COUNT < n_read_zero)
|
||||||
{
|
{
|
||||||
out << "Count passed Limit, shutting down!";
|
out << "Count passed Limit, shutting down!";
|
||||||
|
quietShutdown = true;
|
||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1639,6 +1640,11 @@ bool pqissl::moretoread()
|
|||||||
|
|
||||||
bool pqissl::cansend()
|
bool pqissl::cansend()
|
||||||
{
|
{
|
||||||
|
if (n_read_zero > 0) {
|
||||||
|
rslog(RSL_DEBUG_ALL, pqisslzone,
|
||||||
|
"pqissl::cansend() read socket returns 0, so we don't wanna send know.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
rslog(RSL_DEBUG_ALL, pqisslzone,
|
rslog(RSL_DEBUG_ALL, pqisslzone,
|
||||||
"pqissl::cansend() polling socket!");
|
"pqissl::cansend() polling socket!");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user