History

Merge pull request #6383 from birarda/goodbye-packet

send a hopeful disconnect packet from ACs and Interface

Seth Alves committed 11 years ago

Commit 36af3152 parents 8dcf245 584e35e16 files · +169 −141Browse files

Showing the changes to interface/src/Application.cpp (1 of 16 files). Show all

Unified · Split

interface/src/Application.cpp+10−4
@@ -804,8 +804,11 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) : · 803 unmodified lines
804 804
805void Application::aboutToQuit() {805void Application::aboutToQuit() {
806 emit beforeAboutToQuit();806 emit beforeAboutToQuit();
807
807 getActiveDisplayPlugin()->deactivate();808 getActiveDisplayPlugin()->deactivate();
809
808 _aboutToQuit = true;810 _aboutToQuit = true;
811
809 cleanupBeforeQuit();812 cleanupBeforeQuit();
810}813}
811 814
@@ -831,8 +834,14 @@ void Application::cleanupBeforeQuit() { · 19 unmodified lines
831 834
832 _entities.clear(); // this will allow entity scripts to properly shutdown835 _entities.clear(); // this will allow entity scripts to properly shutdown
833 836
837 auto nodeList = DependencyManager::get<NodeList>();
838
839 // send the domain a disconnect packet, force stoppage of domain-server check-ins
840 nodeList->getDomainHandler().disconnect();
841 nodeList->setIsShuttingDown(true);
842
834 // tell the packet receiver we're shutting down, so it can drop packets843 // tell the packet receiver we're shutting down, so it can drop packets
835 DependencyManager::get<NodeList>()->getPacketReceiver().setShouldDropPackets(true);844 nodeList->getPacketReceiver().setShouldDropPackets(true);
836 845
837 _entities.shutdown(); // tell the entities system we're shutting down, so it will stop running scripts846 _entities.shutdown(); // tell the entities system we're shutting down, so it will stop running scripts
838 ScriptEngine::stopAllScripts(this); // stop all currently running global scripts847 ScriptEngine::stopAllScripts(this); // stop all currently running global scripts
@@ -852,9 +861,6 @@ void Application::cleanupBeforeQuit() { · 13 unmodified lines
852 saveSettings();861 saveSettings();
853 _window->saveGeometry();862 _window->saveGeometry();
854 863
855 // let the avatar mixer know we're out
856 MyAvatar::sendKillAvatar();
857
858 // stop the AudioClient864 // stop the AudioClient
859 QMetaObject::invokeMethod(DependencyManager::get<AudioClient>().data(),865 QMetaObject::invokeMethod(DependencyManager::get<AudioClient>().data(),
860 "stop", Qt::BlockingQueuedConnection);866 "stop", Qt::BlockingQueuedConnection);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t