Skip to content

Commit

Permalink
minor edit
Browse files Browse the repository at this point in the history
  • Loading branch information
Utkarsh Shukla committed Dec 17, 2024
1 parent 0f9af98 commit 9db3548
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/serviceconfig/service_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ func runAPIHandler(em EchoManager, routes Destinations, ep SearchSpec, w http.Re
if session == nil {
logger.Warnw("no such destination for service request", "destination", ep.Destination, "serviceName", ep.ServiceName, "serviceType", ep.ServiceType)
w.WriteHeader(http.StatusBadGateway)
cancel()
return
}

Expand All @@ -257,6 +258,7 @@ func runAPIHandler(em EchoManager, routes Destinations, ep SearchSpec, w http.Re
logger.Errorf("unable to read entire message body")
w.WriteHeader(http.StatusServiceUnavailable)
return

Check failure on line 260 in internal/serviceconfig/service_server.go

View workflow job for this annotation

GitHub Actions / lint

lostcancel: this return statement may be reached without using the cancel var defined on line 244 (govet)
cancel()

Check failure on line 261 in internal/serviceconfig/service_server.go

View workflow job for this annotation

GitHub Actions / lint

unreachable: unreachable code (govet)
}
r.Body.Close()

Expand Down

0 comments on commit 9db3548

Please sign in to comment.