From 99efc3e6edbb7877091124336d6e115da0af67b1 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 11 Nov 2016 13:21:21 +0300 Subject: fix connection router --- .../src/main/java/com/juick/components/s2s/ConnectionRouter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'juick-xmpp/src/main') diff --git a/juick-xmpp/src/main/java/com/juick/components/s2s/ConnectionRouter.java b/juick-xmpp/src/main/java/com/juick/components/s2s/ConnectionRouter.java index b10d2540..8514436d 100644 --- a/juick-xmpp/src/main/java/com/juick/components/s2s/ConnectionRouter.java +++ b/juick-xmpp/src/main/java/com/juick/components/s2s/ConnectionRouter.java @@ -60,7 +60,7 @@ public class ConnectionRouter extends Connection implements Runnable { while (!execution.isComplete()) { try { AsynchronousSocketChannel socket = AsynchronousSocketChannel.open(); - socket.connect(new InetSocketAddress(componentPort)); + socket.connect(new InetSocketAddress("localhost", componentPort)).get(); parser.setInput(new InputStreamReader(Channels.newInputStream(socket))); parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true); writer = new OutputStreamWriter(Channels.newOutputStream(socket)); @@ -260,4 +260,4 @@ public class ConnectionRouter extends Connection implements Runnable { } } } -} \ No newline at end of file +} -- cgit v1.2.3