Skip to content
Permalink
Browse files

Prevent OverlayClient destructor from hanging on disconnect

Limit the maximum time a clean disconnect may take to 1s. Previously
our GUI thread could become semi-permanently blocked.
  • Loading branch information...
hacst committed Apr 30, 2015
1 parent 9a2c0ee commit ad1ed221148cf6e721529f8ff36af45ce4ec5fed
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/mumble/OverlayClient.cpp
@@ -99,8 +99,12 @@ OverlayClient::~OverlayClient() {
delete qgpiCursor;
delete qgpiLogo;

qlsSocket->disconnect();
qlsSocket->abort();
qlsSocket->disconnectFromServer();
if (!qlsSocket->waitForDisconnected(1000)) {
qDebug() << "OverlayClient: Failed to cleanly disconnect: " << qlsSocket->errorString();
qlsSocket->abort();
}

qlsSocket->deleteLater();

ougUsers.reset();

0 comments on commit ad1ed22

Please sign in to comment.
You can’t perform that action at this time.