aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <m.shulhan@gmail.com>2019-10-24 23:36:06 +0700
committerShulhan <m.shulhan@gmail.com>2019-10-24 23:36:14 +0700
commite0dbda608aa3a1b2e24fb76824abf599cd131e98 (patch)
tree3de978bea047706419a31bd302ac489ff009be0b
parent6ad35a5f68b8ff68ac38c222cf9f88edbb55d7d2 (diff)
downloadrescached-e0dbda608aa3a1b2e24fb76824abf599cd131e98.tar.xz
rescached: return error from dns.Wait
By checking error from dns.Wait we can tell if dns Server exit because of error or not.
-rw-r--r--go.mod2
-rw-r--r--go.sum4
-rw-r--r--rescached.go3
3 files changed, 4 insertions, 5 deletions
diff --git a/go.mod b/go.mod
index 2bceac0..929ddbe 100644
--- a/go.mod
+++ b/go.mod
@@ -3,6 +3,6 @@ module github.com/shuLhan/rescached-go/v3
go 1.13
require (
- github.com/shuLhan/share v0.9.1-0.20191023180555-b82e90352e33
+ github.com/shuLhan/share v0.9.1-0.20191024135720-4e911b268f6b
golang.org/x/net v0.0.0-20191014212845-da9a3fd4c582 // indirect
)
diff --git a/go.sum b/go.sum
index 2855545..9bc6fec 100644
--- a/go.sum
+++ b/go.sum
@@ -1,5 +1,5 @@
-github.com/shuLhan/share v0.9.1-0.20191023180555-b82e90352e33 h1:zzh6e7WHxYdkus47edLXrwaG4g6MKs7FCiIZ1SfGSi8=
-github.com/shuLhan/share v0.9.1-0.20191023180555-b82e90352e33/go.mod h1:1+SBspKy8sF3BkQ83Jov/CDul+2e4Y3nr+izWC3hDhI=
+github.com/shuLhan/share v0.9.1-0.20191024135720-4e911b268f6b h1:fK066MaDH01qEFygcDrsxQsS4dtIxhcyGTh5OkB+F+M=
+github.com/shuLhan/share v0.9.1-0.20191024135720-4e911b268f6b/go.mod h1:1+SBspKy8sF3BkQ83Jov/CDul+2e4Y3nr+izWC3hDhI=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190926114937-fa1a29108794/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
diff --git a/rescached.go b/rescached.go
index 6fce494..aa9cbb8 100644
--- a/rescached.go
+++ b/rescached.go
@@ -65,9 +65,8 @@ func (srv *Server) Start() (err error) {
}
srv.dns.Start()
- srv.dns.Wait()
- return nil
+ return srv.dns.Wait()
}
//