Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinjwalls committed Jul 11, 2024
1 parent 015f62d commit 5aeed2a
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
public class from001 {

private static boolean testFailed = false;
private static final int MAX_TRIES = 60; // limit attempts to receive Notification data
private static final int MAX_TRIES = 6; // limit attempts to receive Notification data

public static void main(String[] args) {

Expand Down Expand Up @@ -152,9 +152,9 @@ public boolean continueExecution() {
int tries = 0;
while (!messageReceived && ++tries < MAX_TRIES) {
try {
Object r = from001Listener.queue.poll(1000, TimeUnit.MILLISECONDS);
Object r = from001Listener.queue.poll(10000, TimeUnit.MILLISECONDS);
if (r == null) {
log.display("polling for Notification data");
log.display("poll for Notification data returns null...");
continue;
} else {
messageReceived = true;
Expand Down Expand Up @@ -222,7 +222,6 @@ public void handleNotification(Notification notification, Object handback) {
messageNotSent = false;
} catch(InterruptedException e) {
// ignore, retry
// not needed: messageNotSent = true;
}
}
}
Expand Down

0 comments on commit 5aeed2a

Please sign in to comment.