From 8263b786fbac28d9bf574d9a57a8d03db28f4700 Mon Sep 17 00:00:00 2001 From: Willy Goiffon Date: Thu, 16 Jul 2020 12:16:35 +0200 Subject: [PATCH] Revert "Check f.Sync() errors before closing logfile" This reverts commit f3919db8c4f603c220ad98c056ff422caa747b99. --- matterbridge.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/matterbridge.go b/matterbridge.go index 6d40e423..145ce68c 100644 --- a/matterbridge.go +++ b/matterbridge.go @@ -54,9 +54,8 @@ func main() { // if logging to a file, ensure it is closed when the program terminates defer func() { if f, ok := rootLogger.Out.(*os.File); ok { - if err := f.Sync(); err != nil { - f.Close() - } + f.Sync() + f.Close() } }()