aboutsummaryrefslogtreecommitdiff
path: root/weed/command
diff options
context:
space:
mode:
Diffstat (limited to 'weed/command')
-rw-r--r--weed/command/s3.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/weed/command/s3.go b/weed/command/s3.go
index 045fdec5b..1a4c89dc4 100644
--- a/weed/command/s3.go
+++ b/weed/command/s3.go
@@ -197,8 +197,10 @@ func (s3opt *S3Options) startS3Server() bool {
if len(*s3opt.auditLogConfig) > 0 {
s3err.InitAuditLog(*s3opt.auditLogConfig)
+ if s3err.Logger != nil {
+ defer s3err.Logger.Close()
+ }
}
- defer s3err.Logger.Close()
if *s3opt.tlsPrivateKey != "" {
glog.V(0).Infof("Start Seaweed S3 API Server %s at https port %d", util.Version(), *s3opt.port)