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)