mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-12-24 17:47:41 +01:00
Lets just silence java.util.NoSuchElementException: decrypt - PEOPLE DON'T UNDERSTAND ITS NOT AN ERROR.
This commit is contained in:
parent
4c4cdd51a1
commit
4c96880580
@ -309,15 +309,17 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
||||
unsafe().sendPacket( new PacketFCEncryptionResponse( new byte[ 0 ], new byte[ 0 ] ) );
|
||||
try
|
||||
if ( ch.getHandle().isActive() )
|
||||
{
|
||||
Cipher encrypt = EncryptionUtil.getCipher( Cipher.ENCRYPT_MODE, sharedKey );
|
||||
ch.addBefore( PipelineUtils.DECRYPT_HANDLER, PipelineUtils.ENCRYPT_HANDLER, new CipherEncoder( encrypt ) );
|
||||
} catch ( GeneralSecurityException ex )
|
||||
{
|
||||
disconnect( "Cipher error: " + Util.exception( ex ) );
|
||||
unsafe().sendPacket( new PacketFCEncryptionResponse( new byte[ 0 ], new byte[ 0 ] ) );
|
||||
try
|
||||
{
|
||||
Cipher encrypt = EncryptionUtil.getCipher( Cipher.ENCRYPT_MODE, sharedKey );
|
||||
ch.addBefore( PipelineUtils.DECRYPT_HANDLER, PipelineUtils.ENCRYPT_HANDLER, new CipherEncoder( encrypt ) );
|
||||
} catch ( GeneralSecurityException ex )
|
||||
{
|
||||
disconnect( "Cipher error: " + Util.exception( ex ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
Loading…
Reference in New Issue
Block a user