attempt to fix the deadlock situations in pqithreadstreamer. Also solves the crash when quitting

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8009 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2015-03-10 21:16:41 +00:00
parent 4dede651c7
commit b6ce3ab7b2
3 changed files with 81 additions and 46 deletions

View file

@ -365,7 +365,7 @@ int pqiperson::handleNotifyEvent_locked(NetInterface *ni, int newState, const s
{
pqioutput(PQL_WARNING, pqipersonzone, "pqiperson::notifyEvent() Id: " + PeerId().toStdString() + " CONNECT_FAILED->marking so!");
activepqi->stop(); // STOP THREAD.
activepqi->shutdown(); // STOP THREAD.
active = false;
activepqi = NULL;
}
@ -410,7 +410,7 @@ int pqiperson::reset_locked()
std::map<uint32_t, pqiconnect *>::iterator it;
for(it = kids.begin(); it != kids.end(); ++it)
{
(it->second) -> stop(); // STOP THREAD.
(it->second) -> shutdown(); // STOP THREAD.
(it->second) -> reset();
}