Skip to content

Commit c307569

Browse files
committed
Revert marking response timeout after send.
Caused way to many thread contentions. Needs to be rethought.
1 parent addc9c1 commit c307569

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Diff for: src/kafka-net/KafkaConnection.cs

+2-5
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,9 @@ public async Task<List<T>> SendAsync<T>(IKafkaRequest<T> request)
109109

110110
try
111111
{
112-
var sendTask = SendAsync(request.Encode());
113-
//synchronously add the response message as soon as the send succeeds. If the KafkaTcpSocket is trying establish a connection
114-
//the SendAsync call will block until its establish. If we added response to queue before, it would timeout seperately from the send.
115-
sendTask.ContinueWith(t => AddAsyncRequestItemToResponseQueue(asyncRequest), TaskContinuationOptions.ExecuteSynchronously);
112+
AddAsyncRequestItemToResponseQueue(asyncRequest);
116113

117-
await sendTask.ConfigureAwait(false);
114+
await SendAsync(request.Encode()).ConfigureAwait(false);
118115
}
119116
catch (OperationCanceledException ex)
120117
{

0 commit comments

Comments
 (0)