--- a/jdk/src/share/classes/sun/security/krb5/KdcComm.java Tue Jul 23 09:30:58 2013 +0400
+++ b/jdk/src/share/classes/sun/security/krb5/KdcComm.java Wed Jul 17 18:46:00 2013 +0800
@@ -227,15 +227,15 @@
try {
ibuf = sendIfPossible(obuf, tempKdc.next(), useTCP);
} catch(Exception first) {
+ boolean ok = false;
while(tempKdc.hasNext()) {
try {
ibuf = sendIfPossible(obuf, tempKdc.next(), useTCP);
- if (ibuf != null) {
- return ibuf;
- }
+ ok = true;
+ break;
} catch(Exception ignore) {}
}
- throw first;
+ if (!ok) throw first;
}
if (ibuf == null) {
throw new IOException("Cannot get a KDC reply");