Skip to content

Commit

Permalink
fix too many open files
Browse files Browse the repository at this point in the history
  • Loading branch information
alex cai committed Nov 8, 2016
1 parent a414263 commit b6f12cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion log.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ func (lf *LogFile) directWrite(msg string) error {
if err != nil {
panic(err)
}
//defer file.Close()
defer file.Close()

lf.writeMutex.Lock()
_, err = file.WriteString(msg)
Expand Down

0 comments on commit b6f12cb

Please sign in to comment.