diff options
Diffstat (limited to 'common/listener.cpp')
-rw-r--r-- | common/listener.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/common/listener.cpp b/common/listener.cpp index c6747cd..9922c48 100644 --- a/common/listener.cpp +++ b/common/listener.cpp | |||
@@ -87,6 +87,14 @@ Listener::~Listener() | |||
87 | closeAllConnections(); | 87 | closeAllConnections(); |
88 | } | 88 | } |
89 | 89 | ||
90 | void Listener::checkForUpgrade() | ||
91 | { | ||
92 | if (loadResource().checkForUpgrade()) { | ||
93 | //Close the resource to ensure no transactions are open | ||
94 | m_resource.reset(nullptr); | ||
95 | } | ||
96 | } | ||
97 | |||
90 | void Listener::emergencyAbortAllConnections() | 98 | void Listener::emergencyAbortAllConnections() |
91 | { | 99 | { |
92 | Sink::Notification n; | 100 | Sink::Notification n; |
@@ -289,6 +297,9 @@ void Listener::processCommand(int commandId, uint messageId, const QByteArray &c | |||
289 | } | 297 | } |
290 | m_exiting = true; | 298 | m_exiting = true; |
291 | } break; | 299 | } break; |
300 | case Sink::Commands::UpgradeCommand: | ||
301 | //Because we synchronously run the update directly on resource start, we know that the upgrade is complete once this message completes. | ||
302 | break; | ||
292 | default: | 303 | default: |
293 | if (commandId > Sink::Commands::CustomCommand) { | 304 | if (commandId > Sink::Commands::CustomCommand) { |
294 | SinkLog() << QString("Received custom command from %1: ").arg(client.name) << commandId; | 305 | SinkLog() << QString("Received custom command from %1: ").arg(client.name) << commandId; |