From dd868b608fc9d39acc16b2423d74a09eddbc4501 Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Fri, 8 Jul 2011 17:05:44 +0200 Subject: improve the voiceclient shutdown a bit --- linden/indra/newview/llvoiceclient.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/llvoiceclient.cpp b/linden/indra/newview/llvoiceclient.cpp index 946b289..07d2fa9 100644 --- a/linden/indra/newview/llvoiceclient.cpp +++ b/linden/indra/newview/llvoiceclient.cpp @@ -1209,13 +1209,22 @@ void LLVoiceClient::terminate() // ms_sleep(2000); gVoiceClient->connectorShutdown(); gVoiceClient->closeSocket(); // Need to do this now -- bad things happen if the destructor does it later. - - // This will do unpleasant things on windows. -// killGateway(); - + + LL_DEBUGS("IdleCallbacks") << "IdleCallbacks deleteFunction " + << "called from LLVoiceClient" << LL_ENDL; + gIdleCallbacks.deleteFunction(idle, gVoiceClient); + + if (isGatewayRunning()) + { + // This will do unpleasant things on windows. + // AW: no unpleasant things observed on windows, + // guess they came from sloppy cleanup. + killGateway(); + } + // Don't do this anymore -- LLSingleton will take care of deleting the object. // delete gVoiceClient; - + // Hint to other code not to access the voice client anymore. gVoiceClient = NULL; } -- cgit v1.1