Split part of DNSServer.Start() to a separate ActivateAndServe()

Specifically, move the part that blocks, and call that as necessary.
This means Start() can run on the caller's goroutine and avoid race conditions.
This commit is contained in:
Bryan Boreham committed 2015-06-17 11:35:53 +01:00
1 parent 1b57a24789
commit 9636675c2c
4 files changed
+19 -6

No files matched your search

+1
View File
@@ -182,4 +182,5 @@ func main() {
if err != nil {
Error.Fatal("[main] Failed to start the WeaveDNS server: ", err)
}
srv.ActivateAndServe()
}