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() } }()