mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-03-01 19:31:27 -05:00
remove unneeded pqithreadstreamer and pqissl mutex locks
This commit is contained in:
parent
2c1238db2c
commit
4ead639e8c
libretroshare/src/pqi
@ -372,9 +372,11 @@ int pqissl::status()
|
||||
// tick......
|
||||
int pqissl::tick()
|
||||
{
|
||||
RsStackMutex stack(mSslMtx); /**** LOCKED MUTEX ****/
|
||||
// there is no reason to lock pqissl mutex now
|
||||
// we will lock the mutex later if we actually need to call to ConnectAttempt
|
||||
// RsStackMutex stack(mSslMtx); /**** LOCKED MUTEX ****/
|
||||
|
||||
//pqistreamer::tick();
|
||||
// pqistreamer::tick();
|
||||
|
||||
// continue existing connection attempt.
|
||||
if (!active)
|
||||
@ -385,7 +387,8 @@ int pqissl::tick()
|
||||
#ifdef PQISSL_LOG_DEBUG
|
||||
rslog(RSL_DEBUG_BASIC, pqisslzone, "pqissl::tick() Continuing Connection Attempt!");
|
||||
#endif
|
||||
|
||||
// now lock pqissl mutex, that will take up to 10 ms
|
||||
RsStackMutex stack(mSslMtx); /**** LOCKED MUTEX ****/
|
||||
ConnectAttempt();
|
||||
return 1;
|
||||
}
|
||||
|
@ -43,8 +43,10 @@ bool pqithreadstreamer::RecvItem(RsItem *item)
|
||||
|
||||
int pqithreadstreamer::tick()
|
||||
{
|
||||
RsStackMutex stack(mThreadMutex);
|
||||
tick_bio();
|
||||
// pqithreadstreamer mutex lock is not needed here
|
||||
// we are only checking if the connection is active, and if not active we will try to establish it
|
||||
// RsStackMutex stack(mThreadMutex);
|
||||
tick_bio();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user