public Task CommitAsync(string topic, int partition, long offset) { if (_disposed) { var tc = new TaskCompletionSource <bool>(); tc.SetCanceled(); return(tc.Task); } return(_clusterClient.CommitAsync(topic, partition, offset)); }