mirror of
https://github.com/miekg/dns.git
synced 2025-10-10 17:31:01 +02:00
parent
79f88fc5d7
commit
a07be6b2c1
@ -241,6 +241,7 @@ type Server struct {
|
|||||||
func (srv *Server) ListenAndServe() error {
|
func (srv *Server) ListenAndServe() error {
|
||||||
srv.lock.Lock()
|
srv.lock.Lock()
|
||||||
if srv.started {
|
if srv.started {
|
||||||
|
srv.lock.Unlock()
|
||||||
return &Error{err: "server already started"}
|
return &Error{err: "server already started"}
|
||||||
}
|
}
|
||||||
srv.stopUDP, srv.stopTCP = make(chan bool), make(chan bool)
|
srv.stopUDP, srv.stopTCP = make(chan bool), make(chan bool)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user