summaryrefslogtreecommitdiff
path: root/indra/newview/llstatusbar.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2021-07-23 07:26:20 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2021-07-23 07:26:20 +0300
commitb26bc394483b8315a4be31334d4e0947d845a4e1 (patch)
tree6bdc7ac2689aa8fef76292c6647b9137cb163606 /indra/newview/llstatusbar.cpp
parent07a118889e9a15391e950710864800e8d5c43efc (diff)
parentbe6066eae218856f7fd74b98968a75e5062fa830 (diff)
Merge branch 'master' into DRTVWR-486
Diffstat (limited to 'indra/newview/llstatusbar.cpp')
-rw-r--r--indra/newview/llstatusbar.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index 4d55448d78..0a87b14e17 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -416,7 +416,20 @@ void LLStatusBar::sendMoneyBalanceRequest()
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_MoneyData);
msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null );
- gAgent.sendReliableMessage();
+
+ if (gDisconnected)
+ {
+ LL_DEBUGS() << "Trying to send message when disconnected, skipping balance request!" << LL_ENDL;
+ return;
+ }
+ if (!gAgent.getRegion())
+ {
+ LL_DEBUGS() << "LLAgent::sendReliableMessage No region for agent yet, skipping balance request!" << LL_ENDL;
+ return;
+ }
+ // Double amount of retries due to this request initially happening during busy stage
+ // Ideally this should be turned into a capability
+ gMessageSystem->sendReliable(gAgent.getRegionHost(), LL_DEFAULT_RELIABLE_RETRIES * 2, TRUE, LL_PING_BASED_TIMEOUT_DUMMY, NULL, NULL);
}