Skip to content

Commit

Permalink
Remove error handling on writes for the status endpoint.
Browse files Browse the repository at this point in the history
  • Loading branch information
gmalouf committed Mar 6, 2024
1 parent 95663c3 commit de3286c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions rpcs/healthService.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,5 @@ func MakeHealthService(net network.GossipNode, enableService bool) HealthService

func (h HealthService) ServeHTTP(writer http.ResponseWriter, _ *http.Request) {
writer.WriteHeader(http.StatusOK)
_, err := fmt.Fprintf(writer, "Port is Open!")
if err != nil {
http.Error(writer, err.Error(), http.StatusInternalServerError)
}
_, _ = fmt.Fprintf(writer, "Port is Open!")
}

0 comments on commit de3286c

Please sign in to comment.