command: fix stale error variable logging in filer serving goroutines

- Use local 'err' variable instead of stale 'e' from outer scope
- Applied to both TLS and non-TLS paths for local listener
This commit is contained in:
Chris Lu
2026-01-28 11:27:18 -08:00
parent c62a332c7f
commit 580c2b4ad4

View File

@@ -477,7 +477,7 @@ func (fo *FilerOptions) startFiler() {
if filerLocalListener != nil {
go func() {
if err := newHttpServer(defaultMux, tlsConfig).ServeTLS(filerLocalListener, "", ""); err != nil {
glog.Errorf("Filer Fail to serve: %v", e)
glog.Errorf("Filer Fail to serve: %v", err)
}
}()
}
@@ -496,7 +496,7 @@ func (fo *FilerOptions) startFiler() {
if filerLocalListener != nil {
go func() {
if err := newHttpServer(defaultMux, nil).Serve(filerLocalListener); err != nil {
glog.Errorf("Filer Fail to serve: %v", e)
glog.Errorf("Filer Fail to serve: %v", err)
}
}()
}