• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ThreeMammals / Ocelot / 26761608736

01 Jun 2026 02:34PM UTC coverage: 0.0% (-95.4%) from 95.403%
26761608736

Pull #2394

github

web-flow
Merge e39fc0db2 into e4022a7d8
Pull Request #2394: Harden `FileConfigurationPoller` against timer reentrancy and callback thread leaks, and stabilize `TimeoutDelegatingHandler` timeout test

0 of 7112 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
src/Ocelot/Requester/MessageInvokerHttpRequester.cs
1
using Microsoft.AspNetCore.Http;
2
using Ocelot.Logging;
3
using Ocelot.Middleware;
4
using Ocelot.Responses;
5

6
namespace Ocelot.Requester;
7

8
public class MessageInvokerHttpRequester : IHttpRequester
9
{
10
    private readonly IOcelotLogger _logger;
11
    private readonly IExceptionToErrorMapper _mapper;
12
    private readonly IMessageInvokerPool _messageHandlerPool;
13

14
    public MessageInvokerHttpRequester(IOcelotLoggerFactory loggerFactory,
×
15
        IMessageInvokerPool messageHandlerPool,
×
16
        IExceptionToErrorMapper mapper)
×
17
    {
×
18
        ArgumentNullException.ThrowIfNull(loggerFactory);
×
19
        _logger = loggerFactory.CreateLogger<MessageInvokerHttpRequester>();
×
20

21
        ArgumentNullException.ThrowIfNull(messageHandlerPool);
×
22
        _messageHandlerPool = messageHandlerPool;
×
23

24
        ArgumentNullException.ThrowIfNull(mapper);
×
25
        _mapper = mapper;
×
26
    }
×
27

28
    public async Task<Response<HttpResponseMessage>> GetResponse(HttpContext httpContext)
29
    {
×
30
        var downstreamRequest = httpContext.Items.DownstreamRequest();
×
31
        var messageInvoker = _messageHandlerPool.Get(httpContext.Items.DownstreamRoute());
×
32
        try
33
        {
×
34
            var response = await messageInvoker.SendAsync(downstreamRequest.ToHttpRequestMessage(), httpContext.RequestAborted);
×
35
            return new OkResponse<HttpResponseMessage>(response);
×
36
        }
37
        catch (Exception exception)
×
38
        {
×
39
            var error = _mapper.Map(exception);
×
40
            return new ErrorResponse<HttpResponseMessage>(error);
×
41
        }
42
    }
×
43
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc