Server: unlock when already started.

Closes #161
This commit is contained in:
Miek Gieben 2015-01-11 09:26:00 +00:00
parent 79f88fc5d7
commit a07be6b2c1
1 changed files with 1 additions and 0 deletions

View File

@ -241,6 +241,7 @@ type Server struct {
func (srv *Server) ListenAndServe() error {
srv.lock.Lock()
if srv.started {
srv.lock.Unlock()
return &Error{err: "server already started"}
}
srv.stopUDP, srv.stopTCP = make(chan bool), make(chan bool)