From bf00b2c3a0fbfbdcbd7c5f4ab519049dc02c1263 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Fri, 30 Jan 2015 01:10:37 +0100 Subject: Shutdown command for synchronizers, used by the dummyresourcetest. Otherwise the synchronizer keeps a Storage object alive, while the tests deletes the db. This causes subsequent writes to fail in the next test. --- synchronizer/listener.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'synchronizer') diff --git a/synchronizer/listener.cpp b/synchronizer/listener.cpp index f52e48c..d191bb8 100644 --- a/synchronizer/listener.cpp +++ b/synchronizer/listener.cpp @@ -243,6 +243,12 @@ void Listener::processCommand(int commandId, uint messageId, Client &client, uin m_resource->processCommand(commandId, client.commandBuffer, size, m_pipeline); } break; + case Akonadi2::Commands::ShutdownCommand: + log(QString("\tReceived shutdown command from %1").arg(client.name)); + callback(); + m_server->close(); + emit noClients(); + return; default: if (commandId > Akonadi2::Commands::CustomCommand) { loadResource(); -- cgit v1.2.3