fix panic

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2020-12-14 14:21:04 +03:00
parent 41bf69e97c
commit 62e40d4119

View File

@ -252,6 +252,10 @@ func (h *httpServer) Start() error {
hd := h.hd hd := h.hd
h.RUnlock() h.RUnlock()
if hd == nil {
return errors.New("Server required http.Handler")
}
ln, err := net.Listen("tcp", config.Address) ln, err := net.Listen("tcp", config.Address)
if err != nil { if err != nil {
return err return err