Disposing a Socket that has a pending synchronous Connect/Accept operation intermittently hangs on RedHat7 and CentOS7 x64 in CI.
using var client = new Socket(SocketType.Stream, ProtocolType.Tcp);
Exception ex = await Assert.ThrowsAnyAsync<Exception>(async () =>
{
Task connectTask = Task.Run(() => client.Connect(endPoint));
await WaitForEventAsync(events, "ConnectStart"); // Wait until the operation starts
Task disposeTask = Task.Run(() => client.Dispose());
await new[] { connectTask, disposeTask }.WhenAllOrAnyFailed(); // Hang
});
Existing Connect and Accept tests are potentially masking this failure with the use of a timeout/retry combo.
Example CI Console log
Disposing a Socket that has a pending synchronous Connect/Accept operation intermittently hangs on RedHat7 and CentOS7 x64 in CI.
Existing Connect and Accept tests are potentially masking this failure with the use of a timeout/retry combo.
Example CI Console log