Fix races
Signed-off-by: Emile Vauge <emile@vauge.com>
This commit is contained in:
parent
4e427b5a9e
commit
c1078c4374
19 changed files with 269 additions and 143 deletions
|
@ -35,5 +35,7 @@ func (l *Logger) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.Ha
|
|||
|
||||
// Close closes the logger (i.e. the file).
|
||||
func (l *Logger) Close() {
|
||||
l.file.Close()
|
||||
if l.file != nil {
|
||||
l.file.Close()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue