Skip to content

Commit

Permalink
Emit error in case of error
Browse files Browse the repository at this point in the history
  • Loading branch information
pdelewski committed Dec 27, 2024
1 parent 1d9daba commit 2ef3e94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions quesma/frontend_connectors/basic_http_frontend_connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package frontend_connectors
import (
"bytes"
"context"
"errors"
"io"
"net/http"
"quesma/clickhouse"
Expand Down Expand Up @@ -135,8 +136,7 @@ func (h *BasicHTTPFrontendConnector) Listen() error {
h.mutex.Lock()
defer h.mutex.Unlock()
if h.listener != nil {
// TODO handle this gracefully and return correct error
return nil
return errors.New("listener already started")
}
h.listener = &http.Server{}
h.listener.Addr = h.endpoint
Expand Down

0 comments on commit 2ef3e94

Please sign in to comment.