Pull request: all: fix lint and naming issues vol. 2

Merge in DNS/adguard-home from 2276-fix-lint-2 to master

Updates #2276.

Squashed commit of the following:

commit 24760b9586bb31be134ef9518dbece485560b1a0
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Mon Dec 7 14:39:50 2020 +0300

    all: fix lint and naming issues vol. 2
This commit is contained in:
Ainar Garipov
2020-12-07 15:38:05 +03:00
parent a572876775
commit 7f29d4e546
21 changed files with 188 additions and 189 deletions

View File

@@ -628,7 +628,10 @@ func (s *v6Server) Start() error {
// Stop - stop server
func (s *v6Server) Stop() {
s.ra.Close()
err := s.ra.Close()
if err != nil {
log.Error("dhcpv6: s.ra.Close: %s", err)
}
// DHCPv6 server may not be initialized if ra_slaac_only=true
if s.srv == nil {
@@ -636,10 +639,11 @@ func (s *v6Server) Stop() {
}
log.Debug("DHCPv6: stopping")
err := s.srv.Close()
err = s.srv.Close()
if err != nil {
log.Error("DHCPv6: srv.Close: %s", err)
}
// now server.Serve() will return
s.srv = nil
}