Skip to content
Browse files

JBPM-3688 - Human Task dying issues - avoid infinite retries if canno…

…t connect
  • Loading branch information...
1 parent e16a7d2 commit e302939576aa4f9fc6c0695d0824c8948a9ca1b1 @mswiderski mswiderski committed Aug 15, 2012
View
10 ...-task-hornetq/src/main/java/org/jbpm/task/service/hornetq/HornetQTaskClientConnector.java
@@ -202,9 +202,13 @@ public void write(Object object) {
try {
logger.warn("Connection lost, trying to reconnect...");
disconnect();
- connect();
- // retry sending
- write(object);
+ boolean connected = connect();
+ if (connected) {
+ // retry sending
+ write(object);
+ } else {
+ throw e;
+ }
} catch (Exception e1) {
throw new RuntimeException("Error writing message (Reconnecting failed, exiting...)", e);
}

0 comments on commit e302939

Please sign in to comment.
Something went wrong with that request. Please try again.