Skip to content

Commit

Permalink
Remove the duplicated health check
Browse files Browse the repository at this point in the history
  • Loading branch information
airycanon committed Dec 10, 2024
1 parent b8e58a1 commit e5b9446
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions pkg/adapter/apiserver/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package apiserver
import (
"context"
"fmt"
"net/http"
"time"

cloudevents "github.com/cloudevents/sdk-go/v2"
Expand Down Expand Up @@ -126,20 +125,8 @@ func (a *apiServerAdapter) start(ctx context.Context, stopCh <-chan struct{}) er
}
}

srv := &http.Server{
Addr: ":8080",
// Configure read header timeout to overcome potential Slowloris Attack because ReadHeaderTimeout is not
// configured in the http.Server.
ReadHeaderTimeout: 10 * time.Second,
Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
}),
}
go srv.ListenAndServe()

<-stopCh
stop <- struct{}{}
srv.Shutdown(ctx)
return nil
}

Expand Down

0 comments on commit e5b9446

Please sign in to comment.