You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2020/03/18 09:11:46 UTC
[camel] branch master updated: Fixed:
java.lang.IllegalStateException: This event source has already been closed.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 208b72f Fixed: java.lang.IllegalStateException: This event source has already been closed.
208b72f is described below
commit 208b72f743c53d2eb7d6f977780f64be74703c24
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Mar 18 10:11:26 2020 +0100
Fixed: java.lang.IllegalStateException: This event source has already been closed.
---
.../org/apache/camel/component/soroushbot/support/SoroushBotWS.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/components/camel-soroush/src/test/java/org/apache/camel/component/soroushbot/support/SoroushBotWS.java b/components/camel-soroush/src/test/java/org/apache/camel/component/soroushbot/support/SoroushBotWS.java
index 105bfcf..d37f22e 100644
--- a/components/camel-soroush/src/test/java/org/apache/camel/component/soroushbot/support/SoroushBotWS.java
+++ b/components/camel-soroush/src/test/java/org/apache/camel/component/soroushbot/support/SoroushBotWS.java
@@ -97,7 +97,9 @@ public class SoroushBotWS {
eventBuilder.data(SoroushMessage.class, getSoroushMessage(i, withFile));
eventBuilder.mediaType(MediaType.APPLICATION_JSON_TYPE);
final OutboundEvent event = eventBuilder.build();
- sink.send(event);
+ if (!sink.isClosed()) {
+ sink.send(event);
+ }
// eventOutput.write(event);
Thread.sleep(delay);
}
@@ -105,7 +107,7 @@ public class SoroushBotWS {
sink.close();
}
} catch (InterruptedException e) {
- e.printStackTrace();
+ // ignore
}
}).start();
}