mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
dns: code optimize
This commit is contained in:
1 parent
ff461f615b
commit
8b43213c76
5 files changed
+27
-47
No files matched your search
+5
-2
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user