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:
@@ -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)
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user