Define SubmitAsync Timeout
Posted: Tue Dec 15, 2020 3:30 pm
Hi, I'm migrating to inetlab 2.8.6 in Net. Core and I need to define a Timeout when submit batch messages . In 2.6 version I used Submit method and await the task like this:
But I can't do this with SubmitAsync.
Is There another way to define a timeout to interrupt the submit process
Code: Select all
var task = _client.SubmitAsync(batch);
if (await Task.WhenAny(task, Task.Delay(timeout)) == task)
{//OK
}else
{//TIMEOUT
}
Is There another way to define a timeout to interrupt the submit process