Skip to content

Commit 943d6ca

Browse files
committed
manually added @henkish changes
1 parent 9787377 commit 943d6ca

File tree

4 files changed

+30
-278
lines changed

4 files changed

+30
-278
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
 using System;
2+
using System.IO;
3+
using System.Net;
4+
using System.Reflection;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
using Nest.Domain.Connection;
8+
9+
namespace Nest
10+
{
11+
public class NoTaskHttpConnection : Connection
12+
{
13+
public NoTaskHttpConnection(IConnectionSettings settings) : base(settings)
14+
{
15+
}
16+
17+
protected virtual Task<ConnectionStatus> DoAsyncRequest(HttpWebRequest request, string data = null)
18+
{
19+
var operation = new AsyncRequestOperation(
20+
request,
21+
data,
22+
_ConnectionSettings,
23+
new ConnectionStatusTracer( this._ConnectionSettings.TraceEnabled ) );
24+
return operation.Task;
25+
}
26+
27+
}
28+
}

src/Nest/Domain/Connection/TrueAsyncConnection.cs

Lines changed: 0 additions & 276 deletions
This file was deleted.

src/Nest/Nest.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
</ItemGroup>
7070
<ItemGroup>
7171
<Compile Include="Domain\Connection\AsyncRequestOperation.cs" />
72-
<Compile Include="Domain\Connection\TrueAsyncConnection.cs" />
72+
<Compile Include="Domain\Connection\NoTasksHttpConnection.cs" />
7373
<Compile Include="Domain\Responses\IReindexResponse.cs" />
7474
<Compile Include="DSL\ReindexDescriptor.cs" />
7575
<Compile Include="Exception\ReindexException.cs" />

src/ProtocolLoadTest/TrueAsyncTester.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ internal class TrueAsyncTester : Tester, ITester
1010
public void Run(string indexName, int port, int numMessages, int bufferSize)
1111
{
1212
var settings = this.CreateSettings(indexName, port);
13-
var connection = new TrueAsyncConnection(settings);
13+
var connection = new NoTaskHttpConnection(settings);
1414
var client = new ElasticClient(settings, connection);
1515

1616
Connect(client, settings);

0 commit comments

Comments
 (0)