mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
added missing check for ssl_connection that would cause crash when the ssl connection gets closed by another thread
This commit is contained in:
parent
8fdf8f81a8
commit
e891e2be2e
@ -1622,6 +1622,10 @@ int pqissl::readdata(void *data, int len)
|
||||
#ifdef PQISSL_DEBUG
|
||||
std::cout << "Reading data thread=" << pthread_self() << ", ssl=" << (void*)this << std::endl ;
|
||||
#endif
|
||||
// safety check. Apparently this avoids some SIGSEGV.
|
||||
//
|
||||
if(ssl_connection == NULL)
|
||||
return -1;
|
||||
|
||||
// There is a do, because packets can be splitted into multiple ssl buffers
|
||||
// when they are larger than 16384 bytes. Such packets have to be read in
|
||||
|
Loading…
Reference in New Issue
Block a user