Always print remote IP in InitialHandler
This commit is contained in:
parent
0cf27a0981
commit
7bd8a0276c
@ -653,7 +653,20 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
|||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
return "[" + ( ( getName() != null ) ? getName() : getSocketAddress() ) + "] <-> InitialHandler";
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append( '[' );
|
||||||
|
|
||||||
|
String currentName = getName();
|
||||||
|
if ( currentName != null )
|
||||||
|
{
|
||||||
|
sb.append( currentName );
|
||||||
|
sb.append( ',' );
|
||||||
|
}
|
||||||
|
|
||||||
|
sb.append( getSocketAddress() );
|
||||||
|
sb.append( "] <-> InitialHandler" );
|
||||||
|
|
||||||
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user