diff --git a/logzio-lambda-extensions-logs/main.go b/logzio-lambda-extensions-logs/main.go index 3018294..5692a38 100644 --- a/logzio-lambda-extensions-logs/main.go +++ b/logzio-lambda-extensions-logs/main.go @@ -122,6 +122,7 @@ func main() { select { case <-ctx.Done(): logger.Info(printPrefix, "Received context done event") + logsApiLogger.Drain() logsApiAgent.Shutdown() logger.Info(printPrefix, "Exiting") return