changeset 5239:158a26bcb2af new-fwa

Write the data out!
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 12 May 2020 15:58:19 +0200
parents 6ba7e6ac0882
children 1a17b27d0aa9
files pkg/controllers/fwa.go
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pkg/controllers/fwa.go	Tue May 12 15:52:10 2020 +0200
+++ b/pkg/controllers/fwa.go	Tue May 12 15:58:19 2020 +0200
@@ -390,6 +390,12 @@
 				}
 			}
 
+			if err := out.Write(record); err != nil {
+				// Too late for HTTP status message.
+				log.Printf("error: %v\n", err)
+				return
+			}
+
 			// Reset counters
 			overLDCDays, totalDays = 0, 0
 			for i := range counters {