summaryrefslogtreecommitdiff
path: root/indra/newview/llscripteditorws.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llscripteditorws.cpp')
-rw-r--r--indra/newview/llscripteditorws.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/newview/llscripteditorws.cpp b/indra/newview/llscripteditorws.cpp
index 53ef1d4dc2..cecac23383 100644
--- a/indra/newview/llscripteditorws.cpp
+++ b/indra/newview/llscripteditorws.cpp
@@ -83,7 +83,7 @@ void LLScriptEditorWSServer::onStarted()
auto server = that.lock();
if (server && server->isRunning())
{
- server->broadcastLangugeChange();
+ server->broadcastLanguageChange();
}
});
}
@@ -150,15 +150,15 @@ void LLScriptEditorWSServer::unsubscribeEditor(const std::string &script_id)
auto it = mSubscriptions.find(script_id);
if (it != mSubscriptions.end())
{
- mSubscriptions.erase(it);
S32 connection_id = it->second.mConnectionID;
+ auto connection = it->second.mConnection.lock();
+ mSubscriptions.erase(it);
ptrdiff_t count = std::count_if(mSubscriptions.begin(), mSubscriptions.end(), [connection_id](const auto& pair) {
return pair.second.mConnectionID == connection_id;
});
- auto connection = it->second.mConnection.lock();
if (connection && !count)
{ // We have removed the last subscription, close the connection
- LL_DEBUGS("ScriptEditorWS") << "Closing connection ID " << it->second.mConnectionID <<
+ LL_DEBUGS("ScriptEditorWS") << "Closing connection ID " << connection_id <<
" as last subscription was removed" << LL_ENDL;
connection->sendDisconnect(LLScriptEditorWSConnection::REASON_EDITOR_CLOSED, "Editor closed");
}