dns: code optimize

This commit is contained in:
nadoo committed 2020-04-13 00:55:11 +08:00
1 parent ff461f615b
commit 8b43213c76
5 files changed
+27 -47

No files matched your search

+5 -2
View File
@@ -24,12 +24,15 @@ type Server struct {
// NewServer returns a new dns server.
func NewServer(addr string, p proxy.Proxy, config *Config) (*Server, error) {
c, err := NewClient(p, config)
if err != nil {
return nil, err
}
s := &Server{
addr: addr,
Client: c,
}
return s, err
return s, nil
}
// Start starts the dns forwarding server.