[1/2] activemq-artemis git commit: ARTEMIS-1507 ActiveMQConnectionTimedOutException is thrown even though no timeout expired

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[1/2] activemq-artemis git commit: ARTEMIS-1507 ActiveMQConnectionTimedOutException is thrown even though no timeout expired

clebertsuconic-2
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 0d38250ff -> d03c4c8cc


ARTEMIS-1507 ActiveMQConnectionTimedOutException is thrown even though no timeout expired

When the execution of code jumps out of the while cycle,
it should check whether the blocking-call-timeout expired or not.
If no, ActiveMQUnBlockedException should be thrown
instead of ActiveMQConnectionTimedOutException.


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/5f8cef98
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/5f8cef98
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/5f8cef98

Branch: refs/heads/master
Commit: 5f8cef98659eff02d33f89105b53eabf9996379a
Parents: 0d38250
Author: Erich Duda <[hidden email]>
Authored: Fri Nov 3 15:29:57 2017 +0100
Committer: Erich Duda <[hidden email]>
Committed: Tue Nov 7 08:42:58 2017 +0100

----------------------------------------------------------------------
 .../activemq/artemis/core/protocol/core/impl/ChannelImpl.java   | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5f8cef98/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java
index 39bddf5..2ef59c0 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java
@@ -397,6 +397,11 @@ public final class ChannelImpl implements Channel {
                start = now;
             }
 
+            if (closed && toWait > 0 && response == null) {
+               Throwable cause = ActiveMQClientMessageBundle.BUNDLE.connectionDestroyed();
+               throw ActiveMQClientMessageBundle.BUNDLE.unblockingACall(cause);
+            }
+
             if (response == null) {
                throw ActiveMQClientMessageBundle.BUNDLE.timedOutSendingPacket(connection.getBlockingCallTimeout(), packet.getType());
             }

Reply | Threaded
Open this post in threaded view
|

[2/2] activemq-artemis git commit: This closes #1649

clebertsuconic-2
This closes #1649


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/d03c4c8c
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/d03c4c8c
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/d03c4c8c

Branch: refs/heads/master
Commit: d03c4c8cc73646e96c4a72a5f6cffead624de663
Parents: 0d38250 5f8cef9
Author: Clebert Suconic <[hidden email]>
Authored: Tue Nov 7 19:08:40 2017 -0500
Committer: Clebert Suconic <[hidden email]>
Committed: Tue Nov 7 19:08:40 2017 -0500

----------------------------------------------------------------------
 .../activemq/artemis/core/protocol/core/impl/ChannelImpl.java   | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------