enable delay to somehow improve the disconnect behaviour (problem not yet fully solved)
This commit is contained in:
parent
39314610bb
commit
252c302ccf
1 changed files with 9 additions and 7 deletions
|
@ -334,13 +334,15 @@ void CClient::Stop()
|
||||||
// stop audio interface
|
// stop audio interface
|
||||||
Sound.Stop();
|
Sound.Stop();
|
||||||
|
|
||||||
/*
|
// wait for approx. 300 ms to make sure no audio packet is still in the
|
||||||
// TEST (seems not to work, disconnect is still not working reliably)
|
// network queue causing the channel to be reconnected right after having
|
||||||
QTime dieTime = QTime::currentTime().addMSecs(500);
|
// received the disconnect message (seems not to gain much, disconnect is
|
||||||
while( QTime::currentTime() < dieTime ) {
|
// still not working reliably)
|
||||||
QCoreApplication::processEvents(QEventLoop::AllEvents, 100);
|
QTime dieTime = QTime::currentTime().addMSecs ( 300 );
|
||||||
}
|
while ( QTime::currentTime() < dieTime )
|
||||||
*/
|
{
|
||||||
|
QCoreApplication::processEvents ( QEventLoop::AllEvents, 100 );
|
||||||
|
}
|
||||||
|
|
||||||
// Send disconnect message to server (Since we disable our protocol
|
// Send disconnect message to server (Since we disable our protocol
|
||||||
// receive mechanism with the next command, we do not evaluate any
|
// receive mechanism with the next command, we do not evaluate any
|
||||||
|
|
Loading…
Add table
Reference in a new issue