Skip to content

Commit db30d0c

Browse files
authored
Collected requests do not fail in a connecting state (#695)
* Collected requests do not fail in a connecting state * .
1 parent 93518e5 commit db30d0c

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

source/Halibut/Queue/Redis/RedisPendingRequest.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,8 @@ public async Task WaitUntilComplete(Func<Task> checkIfPendingRequestWasCollected
145145
log.Write(EventType.MessageExchange, "Request {0} was cancelled before a response was received", request);
146146
SetResponseNoLock(ResponseMessage.FromException(
147147
request,
148-
new TimeoutException("A request was sent to a polling endpoint, the polling endpoint collected it but the request was cancelled before the polling endpoint responded."),
149-
ConnectionState.Connecting),
150-
requestWasCollected: false);
148+
new TimeoutException("A request was sent to a polling endpoint, the polling endpoint collected it but the request was cancelled before the polling endpoint responded.")),
149+
requestWasCollected: true);
151150
await Try.IgnoringError(async () => await pendingRequestCancellationTokenSource.CancelAsync());
152151
}
153152
}

source/Halibut/ServiceModel/PendingRequestQueueAsync.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,7 @@ public async Task WaitUntilComplete(CancellationToken cancellationToken)
273273
log.Write(EventType.MessageExchange, "Request {0} was cancelled before a response was received", request);
274274
SetResponse(ResponseMessage.FromException(
275275
request,
276-
new TimeoutException($"A request was sent to a polling endpoint, the polling endpoint collected it but the request was cancelled before the polling endpoint responded."),
277-
ConnectionState.Connecting));
276+
new TimeoutException($"A request was sent to a polling endpoint, the polling endpoint collected it but the request was cancelled before the polling endpoint responded.")));
278277
}
279278
else
280279
{

0 commit comments

Comments
 (0)