From 007a2b2c231cb35faa7d5c2576ee90c922d5b0fa Mon Sep 17 00:00:00 2001 From: Simon Shillaker Date: Thu, 17 Jun 2021 12:54:42 +0000 Subject: [PATCH] Send response --- src/scheduler/FunctionCallClient.cpp | 3 +++ src/scheduler/FunctionCallServer.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/scheduler/FunctionCallClient.cpp b/src/scheduler/FunctionCallClient.cpp index a32701e8e..27e974151 100644 --- a/src/scheduler/FunctionCallClient.cpp +++ b/src/scheduler/FunctionCallClient.cpp @@ -102,6 +102,9 @@ void FunctionCallClient::sendFlush() call.set_returnhost(faabric::util::getSystemConfig().endpointHost); SEND_MESSAGE(faabric::scheduler::FunctionCalls::Flush, call); + + // Await the response + awaitResponse(FUNCTION_CALL_PORT + REPLY_PORT_OFFSET); } } diff --git a/src/scheduler/FunctionCallServer.cpp b/src/scheduler/FunctionCallServer.cpp index 93640e519..e17a13b06 100644 --- a/src/scheduler/FunctionCallServer.cpp +++ b/src/scheduler/FunctionCallServer.cpp @@ -54,6 +54,9 @@ void FunctionCallServer::recvFlush(faabric::transport::Message& body) // Clear the scheduler scheduler.flushLocally(); + + faabric::EmptyResponse response; + SEND_SERVER_RESPONSE(response, msg.returnhost(), FUNCTION_CALL_PORT) } void FunctionCallServer::recvExecuteFunctions(faabric::transport::Message& body)