- dns query log: robust file flushing mechanism
Before this patch we could exit the process without waiting for file writing task to complete. As a result a file could become corrupted or a large chunk of data could be missing. Now the main thread either waits until file writing task completes or it writes log buffer to file itself.
This commit is contained in:
@@ -236,7 +236,7 @@ func (s *Server) stopInternal() error {
|
||||
}
|
||||
|
||||
// flush remainder to file
|
||||
return s.queryLog.flushLogBuffer()
|
||||
return s.queryLog.flushLogBuffer(true)
|
||||
}
|
||||
|
||||
// IsRunning returns true if the DNS server is running
|
||||
|
||||
Reference in New Issue
Block a user