git/githistory/log: make Close() a no-op for nil receiver

This commit is contained in:
Taylor Blau 2017-06-14 16:31:40 -06:00
parent ef576f0fa6
commit 12fb91a431

@ -59,6 +59,10 @@ func NewLogger(sink io.Writer) *Logger {
// Close closes the queue and does not allow new Tasks to be `enqueue()`'d. It
// waits until the currently running Task has completed.
func (l *Logger) Close() {
if l == nil {
return
}
close(l.queue)
l.wg.Wait()