Use of net/http's ListenAndServe function has no support for setting timeouts GO-S2114
Security
Major
6 months agoa year old
Use of net/http serve function that has no support for setting timeouts
21	if c.UseTLS() {
22		err = http.ServeTLS(ln, h.Handler(), c.Cert(), c.Key())
23	} else {
24		err = http.Serve(ln, h.Handler())25	}
26
27	return
Use of net/http serve function that has no support for setting timeouts
19	h := server.NewHub(c)
20
21	if c.UseTLS() {
22		err = http.ServeTLS(ln, h.Handler(), c.Cert(), c.Key())23	} else {
24		err = http.Serve(ln, h.Handler())
25	}
Use of net/http serve function that has no support for setting timeouts
14	}
15	port := args[0]
16	log.Println("Listening on", port)
17	log.Println(http.Serve(listener.Listener(port), handler.Handler("/")))18	return nil
19}