mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
HTTP trigger http-stream tests (#1241)
This commit is contained in:
@@ -755,13 +755,18 @@ func (s *hotSlot) dispatch(ctx context.Context, call *call) chan error {
|
||||
}
|
||||
|
||||
go func() {
|
||||
// TODO it's possible we can get rid of this (after getting rid of logs API) - may need for call id/debug mode still
|
||||
// TODO there's a timeout race for swapping this back if the container doesn't get killed for timing out, and don't you forget it
|
||||
swapBack := s.container.swap(nil, call.stderr, call.stderr, &call.Stats)
|
||||
defer swapBack()
|
||||
|
||||
resp, err := s.udsClient.Do(req)
|
||||
if err != nil {
|
||||
common.Logger(ctx).WithError(err).Error("Got error from UDS socket")
|
||||
errApp <- models.NewAPIError(http.StatusBadGateway, errors.New("error receiving function response"))
|
||||
return
|
||||
}
|
||||
common.Logger(ctx).WithField("status", resp.StatusCode).Debug("Got resp from UDS socket")
|
||||
common.Logger(ctx).WithField("resp", resp).Debug("Got resp from UDS socket")
|
||||
|
||||
defer resp.Body.Close()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user