Merge branch 'stable-6.10' into stable-7.0

* stable-6.10:
  AdvertisedRequestValidator: fix WantNotValidException caused by race

Change-Id: I22ec79d91136f8209a3799465db5593d83f7bea9
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
index ec51c88..3772c00 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
@@ -1937,10 +1937,9 @@ public static final class AdvertisedRequestValidator
 		@Override
 		public void checkWants(UploadPack up, List<ObjectId> wants)
 				throws PackProtocolException, IOException {
-			if (!up.isBiDirectionalPipe())
+			if (!up.isBiDirectionalPipe() || !wants.isEmpty()) {
 				new ReachableCommitRequestValidator().checkWants(up, wants);
-			else if (!wants.isEmpty())
-				throw new WantNotValidException(wants.iterator().next());
+			}
 		}
 	}