mirror of
https://github.com/zrepl/zrepl.git
synced 2024-11-22 00:13:52 +01:00
make vet happy: 'don't leak contexts'
This commit is contained in:
parent
8934d7cb64
commit
45670a7e5d
@ -103,6 +103,7 @@ outer:
|
||||
}
|
||||
|
||||
signal.Stop(sigChan)
|
||||
cancel() // make go vet happy
|
||||
|
||||
log.Info("exiting")
|
||||
|
||||
|
@ -41,7 +41,7 @@ func (l *Logger) log(level Level, msg string) {
|
||||
|
||||
entry := Entry{level, msg, time.Now(), l.fields}
|
||||
|
||||
ctx, _ := context.WithDeadline(context.Background(), time.Now().Add(l.outletTimeout))
|
||||
ctx, cancel := context.WithDeadline(context.Background(), time.Now().Add(l.outletTimeout))
|
||||
ech := make(chan error)
|
||||
|
||||
louts := l.outlets[level]
|
||||
@ -64,6 +64,8 @@ func (l *Logger) log(level Level, msg string) {
|
||||
}
|
||||
}
|
||||
|
||||
cancel() // make go vet happy
|
||||
|
||||
}
|
||||
|
||||
func (l *Logger) WithField(field string, val interface{}) *Logger {
|
||||
|
Loading…
Reference in New Issue
Block a user