From ecbb1db2c953f90c2a60206f75f85f46d3a485f8 Mon Sep 17 00:00:00 2001 From: hiker Date: Wed, 24 Jan 2018 08:39:10 +1100 Subject: [PATCH] Flush buffer in case of a disconnect, which allows the server to use buffered logging, which will be written when the client disappears. --- src/network/stk_host.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/network/stk_host.cpp b/src/network/stk_host.cpp index 6ac01f207..f7ddb7c65 100644 --- a/src/network/stk_host.cpp +++ b/src/network/stk_host.cpp @@ -562,6 +562,7 @@ void* STKHost::mainLoop(void* self) else if (stk_event->getType() == EVENT_TYPE_DISCONNECTED) { Log::info("STKHost", "A client has just disconnected."); + Log::flushBuffers(); } // EVENT_TYPE_CONNECTED else if (stk_event->getType() == EVENT_TYPE_MESSAGE) {