fixed issue with prematurely interrupting the inputstream getter thread\nmade secondary check for inputstream null

This commit is contained in:
Brian Matzon 2008-04-06 22:15:16 +00:00
parent bf25259325
commit 3b5c704383
1 changed files with 9 additions and 7 deletions

View File

@ -732,7 +732,7 @@ public class AppletLoader extends Applet implements Runnable, AppletStub {
t.start();
int iterationCount = 0;
while(is == null && iterationCount++ < 5) {
while(is[0] == null && iterationCount++ < 5) {
try {
t.join(1000);
} catch (InterruptedException inte) {
@ -740,6 +740,7 @@ public class AppletLoader extends Applet implements Runnable, AppletStub {
}
}
if(is[0] == null) {
try {
t.interrupt();
t.join();
@ -747,6 +748,7 @@ public class AppletLoader extends Applet implements Runnable, AppletStub {
/* ignored */
}
}
}
if(is[0] == null) {
throw new Exception("Unable to get input stream for " + currentFile);