public void Recv() { context.Post(async() => { ++received; if (sent < repeat) { try { await destination.Pong(); await context; if (done) { return; } ++sent; Recv(); } catch { } } else if (received == repeat) { done = true; latch.SetResult(true); } }); }