Allow cancelling LoginEvents with component reasons.

Ultimately this PR was selected as it better matched the existing code in terms of using lombok and not adding incomplete interfacing.
If for some reason a common interface is required, this can be implemented later.

Thanks to yawkat also for the PR in #1336 -- it was difficult for the merger to compromise between this and #1957
This commit is contained in:
Gabscap
2016-12-01 10:01:12 +11:00
committed by md_5
parent 2171ca9f51
commit ea6680281f
3 changed files with 68 additions and 4 deletions

View File

@@ -360,7 +360,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
{
if ( result.isCancelled() )
{
disconnect( result.getCancelReason() );
disconnect( result.getCancelReasonComponents() );
return;
}
if ( ch.isClosed() )
@@ -479,7 +479,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
{
if ( result.isCancelled() )
{
disconnect( result.getCancelReason() );
disconnect( result.getCancelReasonComponents() );
return;
}
if ( ch.isClosed() )