mirror of
https://github.com/coredns/coredns.git
synced 2025-12-06 02:15:11 -05:00
plugin/erratic: doc and zone transfer (#3340)
Fix the documentation, remove autopath entry and fix the transfer by copying some bits from the file plugin. Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
@@ -2,6 +2,7 @@ package erratic
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/coredns/coredns/plugin/test"
|
||||
"github.com/coredns/coredns/request"
|
||||
@@ -46,6 +47,11 @@ func xfr(state request.Request, truncate bool) {
|
||||
close(ch)
|
||||
}()
|
||||
|
||||
tr.Out(state.W, state.Req, ch)
|
||||
state.W.Hijack()
|
||||
wg := new(sync.WaitGroup)
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
tr.Out(state.W, state.Req, ch)
|
||||
wg.Done()
|
||||
}()
|
||||
wg.Wait()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user