Split http-startup code from server-startup

This commit is contained in:
Bryan Boreham authored and Michael Bridgen committed 2015-01-08 18:38:38 +00:00
1 parent 89fa52818c
commit bd2844d186
2 files changed
+3 -4

No files matched your search

+1 -3
View File
@@ -98,9 +98,7 @@ func notUsHandler() dns.HandlerFunc {
}
}
func StartServer(zone Zone, iface *net.Interface, dnsPort int, httpPort int, wait int) error {
go ListenHttp(LOCAL_DOMAIN, zone, httpPort)
func StartServer(zone Zone, iface *net.Interface, dnsPort int, wait int) error {
mdnsClient, err := NewMDNSClient()
checkFatal(err)
+2 -1
View File
@@ -63,7 +63,8 @@ func main() {
}
}
err := weavedns.StartServer(zone, iface, dnsPort, httpPort, wait)
go weavedns.ListenHttp(weavedns.LOCAL_DOMAIN, zone, httpPort)
err := weavedns.StartServer(zone, iface, dnsPort, wait)
if err != nil {
Error.Fatal("Failed to start server", err)
}