Skip to content

Commit

Permalink
display errors from server call.
Browse files Browse the repository at this point in the history
  • Loading branch information
heyLu committed Oct 7, 2014
1 parent 3f5056d commit 52e868d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ func main() {
server := &dns.Server{Addr: addr, Net: "udp"}
fmt.Printf("running server on %s\n", addr)

server.ListenAndServe()
err := server.ListenAndServe()
if err != nil {
fmt.Println(err)
os.Exit(1)
}
}

func SimpleHandler(w dns.ResponseWriter, req *dns.Msg) {
Expand Down

0 comments on commit 52e868d

Please sign in to comment.