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:
1 parent
1b57a24789
commit
9636675c2c
4 files changed
+19
-6
No files matched your search
@@ -182,4 +182,5 @@ func main() {
|
||||
if err != nil {
|
||||
Error.Fatal("[main] Failed to start the WeaveDNS server: ", err)
|
||||
}
|
||||
srv.ActivateAndServe()
|
||||
}
|
||||
Reference in new issue
Block a user