You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2014/12/24 02:55:24 UTC
camel git commit: CAMEL-8168 Fixed the unit test error of camel-mina2
Repository: camel
Updated Branches:
refs/heads/master 3e899df18 -> 4b8febaba
CAMEL-8168 Fixed the unit test error of camel-mina2
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/4b8febab
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/4b8febab
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/4b8febab
Branch: refs/heads/master
Commit: 4b8febaba704f6f1241fb3f7aeb869df63bf5901
Parents: 3e899df
Author: Willem Jiang <wi...@gmail.com>
Authored: Wed Dec 24 09:55:09 2014 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Wed Dec 24 09:55:09 2014 +0800
----------------------------------------------------------------------
.../java/org/apache/camel/component/mina2/Mina2Consumer.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/4b8febab/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Consumer.java
----------------------------------------------------------------------
diff --git a/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Consumer.java b/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Consumer.java
index deea5b6..f485155 100644
--- a/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Consumer.java
+++ b/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Consumer.java
@@ -95,15 +95,17 @@ public class Mina2Consumer extends DefaultConsumer {
@Override
protected void doStop() throws Exception {
LOG.info("Unbinding from server address: {} using acceptor: {}", address, acceptor);
- // need to check if the address is IPV4 TCP all net work address
if (address instanceof InetSocketAddress) {
+ // need to check if the address is IPV4 TCP all net work address
if ("0.0.0.0".equals(((InetSocketAddress)address).getAddress().getHostAddress())) {
+ System.out.println("Unbind the server address " + acceptor.getLocalAddresses());
acceptor.unbind(acceptor.getLocalAddresses());
- }
+ } else {
+ acceptor.unbind(address);
+ }
} else {
acceptor.unbind(address);
}
-
super.doStop();
}