diff options
| -rwxr-xr-x | indra/newview/llappviewer.cpp | 9 | ||||
| -rwxr-xr-x[-rw-r--r--] | indra/newview/llappviewer.h | 2 | ||||
| -rwxr-xr-x | indra/newview/llvoavatarself.cpp | 7 | 
3 files changed, 13 insertions, 5 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 9a5010c781..70c5527b23 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -291,6 +291,8 @@ LLTimer gLogoutTimer;  static const F32 LOGOUT_REQUEST_TIME = 6.f;  // this will be cut short by the LogoutReply msg.  F32 gLogoutMaxTime = LOGOUT_REQUEST_TIME; +S32 gPendingMetricsUploads = 0; +  BOOL				gDisconnected = FALSE;  // used to restore texture state after a mode switch @@ -4725,6 +4727,13 @@ void LLAppViewer::idleShutdown()  		return;  	} +	if (gPendingMetricsUploads > 0 +		&& gLogoutTimer.getElapsedTimeF32() < SHUTDOWN_UPLOAD_SAVE_TIME +		&& !logoutRequestSent()) +	{ +		return; +	} +  	// All floaters are closed.  Tell server we want to quit.  	if( !logoutRequestSent() )  	{ diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index be72421c58..b69a1944a6 100644..100755 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -341,6 +341,8 @@ extern LLFrameTimer gLoggedInTime;  extern F32 gLogoutMaxTime;  extern LLTimer gLogoutTimer; +extern S32 gPendingMetricsUploads; +  extern F32 gSimLastTime;   extern F32 gSimFrames; diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 1a1564e1a8..7e24c43017 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -2223,6 +2223,7 @@ public:  						   const std::string& reason,  						   const LLSD& content)  	{ +		gPendingMetricsUploads--; // if we add retry, this should be moved to the isGoodStatus case.  		if (isGoodStatus(status))  		{  			LL_DEBUGS("Avatar") << "OK" << LL_ENDL; @@ -2236,11 +2237,6 @@ public:  	}  	// virtual -	void error(U32 status_num, const std::string & reason) -	{ -	} - -	// virtual  	void result(const LLSD & content)  	{  		if (mLiveSequence == mExpectedSequence) @@ -2384,6 +2380,7 @@ void LLVOAvatarSelf::sendViewerAppearanceChangeMetrics()  	}  	if (!caps_url.empty())  	{ +		gPendingMetricsUploads++;  		LLCurlRequest::headers_t headers;  		LLHTTPClient::post(caps_url,  						   msg,  | 
