Mercurial > hg > sonic-visualiser
changeset 2529:c7554741550f
Discard rest of OSC queue when exiting from OSC
author | Chris Cannam |
---|---|
date | Wed, 29 Apr 2020 17:48:49 +0100 |
parents | 84ddd274fcc0 |
children | 89895d455b98 |
files | main/OSCHandler.cpp |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/main/OSCHandler.cpp Wed Apr 29 16:52:26 2020 +0100 +++ b/main/OSCHandler.cpp Wed Apr 29 17:48:49 2020 +0100 @@ -772,6 +772,14 @@ } else if (message.getMethod() == "quit") { SVDEBUG << "OSCHandler: Exiting abruptly" << endl; + + // discard any more pending OSC messages + if (m_oscQueue) { + while (!m_oscQueue->isEmpty()) { + (void)m_oscQueue->readMessage(); + } + } + m_documentModified = false; // so we don't ask to save close();