Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sw-joelmut committed Oct 5, 2023
1 parent f5050ab commit faa7f42
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,11 @@ public virtual void ReceiveResponse(Header header, ReceiveResponse response)

Log.PayloadReceived(_logger, header);

if (response.StatusCode == (int)HttpStatusCode.Accepted)
{
return;
}

lock (_receiveSync)
{
if (!response.Streams.Any())
Expand Down
6 changes: 6 additions & 0 deletions libraries/Microsoft.Bot.Streaming/ProtocolAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under the MIT License.

using System;
using System.Net;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
Expand Down Expand Up @@ -75,6 +76,11 @@ private async Task OnReceiveRequestAsync(Guid id, ReceiveRequest request)

private async Task OnReceiveResponseAsync(Guid id, ReceiveResponse response)
{
if (response.StatusCode == (int)HttpStatusCode.Accepted)
{
return;
}

// we received the response to something, signal it
await _requestManager.SignalResponseAsync(id, response).ConfigureAwait(false);
}
Expand Down

0 comments on commit faa7f42

Please sign in to comment.