Pull request: all: imp code, err handling
Closes #2571. Squashed commit of the following: commit a5b50ee011a995f4ab3d93314acd6f0ca82d99cf Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Mar 15 14:05:25 2021 +0300 all: imp code commit bc610f8f438549e8c6b04c8a213b5422dda2aff5 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri Mar 12 20:00:14 2021 +0300 all: imp code, err handling
This commit is contained in:
@@ -508,8 +508,8 @@ func (s *Server) handleReset(w http.ResponseWriter, r *http.Request) {
|
||||
s.Stop()
|
||||
|
||||
err := os.Remove(s.conf.DBFilePath)
|
||||
if err != nil && !os.IsNotExist(err) {
|
||||
log.Error("DHCP: os.Remove: %s: %s", s.conf.DBFilePath, err)
|
||||
if err != nil && !errors.Is(err, os.ErrNotExist) {
|
||||
log.Error("dhcp: removing %q: %s", s.conf.DBFilePath, err)
|
||||
}
|
||||
|
||||
oldconf := s.conf
|
||||
|
||||
Reference in New Issue
Block a user