Added reconnect feature for dnstap plugin (#1267)
This commit is contained in:
parent
917965fa86
commit
861e2382c2
3 changed files with 158 additions and 119 deletions
|
@ -65,14 +65,11 @@ func setup(c *caddy.Controller) error {
|
|||
return err
|
||||
}
|
||||
|
||||
dio := dnstapio.New()
|
||||
dio := dnstapio.New(conf.target, conf.socket)
|
||||
dnstap := Dnstap{IO: dio, Pack: conf.full}
|
||||
|
||||
c.OnStartup(func() error {
|
||||
err := dio.Connect(conf.target, conf.socket)
|
||||
if err != nil {
|
||||
return plugin.Error("dnstap", err)
|
||||
}
|
||||
dio.Connect()
|
||||
return nil
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue