From fbb2f695b0a4329a316299895ad98be5a038ccac Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 26 Jun 2014 19:08:05 +1000 Subject: [PATCH] Show correct error when cannot bind query --- proxy/src/main/java/net/md_5/bungee/BungeeCord.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java index ef63068d..d3c46f13 100644 --- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java +++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java @@ -203,7 +203,7 @@ public class BungeeCord extends ProxyServer System.setProperty( "io.netty.selectorAutoRebuildThreshold", "0" ); // Seems to cause Bungee to stop accepting connections ResourceLeakDetector.setEnabled( false ); // Eats performance - eventLoops = PipelineUtils.newEventLoopGroup(0, new ThreadFactoryBuilder().setNameFormat( "Netty IO Thread #%1$d" ).build() ); + eventLoops = PipelineUtils.newEventLoopGroup( 0, new ThreadFactoryBuilder().setNameFormat( "Netty IO Thread #%1$d" ).build() ); File moduleDirectory = new File( "modules" ); moduleManager.load( this, moduleDirectory ); @@ -276,11 +276,11 @@ public class BungeeCord extends ProxyServer getLogger().info( "Started query on " + future.channel().localAddress() ); } else { - getLogger().log( Level.WARNING, "Could not bind to host " + future.channel().remoteAddress(), future.cause() ); + getLogger().log( Level.WARNING, "Could not bind to host " + info.getHost(), future.cause() ); } } }; - new RemoteQuery( this, info ).start(PipelineUtils.getDatagramChannel(), new InetSocketAddress( info.getHost().getAddress(), info.getQueryPort() ), eventLoops, bindListener ); + new RemoteQuery( this, info ).start( PipelineUtils.getDatagramChannel(), new InetSocketAddress( info.getHost().getAddress(), info.getQueryPort() ), eventLoops, bindListener ); } } }