diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-07-12 14:18:18 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-07-12 14:18:18 +0200 |
commit | e7f9a6bf8f681daef1b4157bbac8670c47bd2120 (patch) | |
tree | 7cb3ea4b80fa3a53ea8e6c59538cf02666ebdb1b /common/listener.h | |
parent | 38f7eca10b62548825bc6a9e7cadf27c7ece1827 (diff) | |
download | sink-e7f9a6bf8f681daef1b4157bbac8670c47bd2120.tar.gz sink-e7f9a6bf8f681daef1b4157bbac8670c47bd2120.zip |
Immediately stop processing commands on shutdown.
We send the command completion, then the shutdown notificaiton,
and then we immediately shutdown.
Otherwise we risk callbacks by further commands into the already
destroyed resource.
Diffstat (limited to 'common/listener.h')
-rw-r--r-- | common/listener.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/common/listener.h b/common/listener.h index d6c537a..8d8b529 100644 --- a/common/listener.h +++ b/common/listener.h | |||
@@ -85,6 +85,7 @@ private: | |||
85 | void updateClientsWithRevision(qint64); | 85 | void updateClientsWithRevision(qint64); |
86 | Sink::Resource &loadResource(); | 86 | Sink::Resource &loadResource(); |
87 | void readFromSocket(QLocalSocket *socket); | 87 | void readFromSocket(QLocalSocket *socket); |
88 | void sendShutdownNotification(); | ||
88 | qint64 lowerBoundRevision(); | 89 | qint64 lowerBoundRevision(); |
89 | 90 | ||
90 | std::unique_ptr<QLocalServer> m_server; | 91 | std::unique_ptr<QLocalServer> m_server; |
@@ -96,4 +97,5 @@ private: | |||
96 | std::unique_ptr<QTimer> m_clientBufferProcessesTimer; | 97 | std::unique_ptr<QTimer> m_clientBufferProcessesTimer; |
97 | std::unique_ptr<QTimer> m_checkConnectionsTimer; | 98 | std::unique_ptr<QTimer> m_checkConnectionsTimer; |
98 | int m_messageId; | 99 | int m_messageId; |
100 | bool m_exiting; | ||
99 | }; | 101 | }; |