-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix InitialHandler exception handling behaivour #3279
base: master
Are you sure you want to change the base?
Conversation
I think we should make it so it still sends disconnect packet. |
but it would never do, we need to wait the 250ms to send a kick message otherwise it would be buggy and i think waiting when encountering an exception is not very good. Edit: my bad, sending it directly with unsafe.sendPacket works in this case, so i will add it and send it without delay, the handler boss will directly close it after we send the kick packet, cause the handler boss will close it instantly anyway waiting 250ms would make no sense at all |
otherwise the packet is not sent to the client and remove the other close because the HandlerBoss will close it for as and the inactiv will mark the channel as closed also
@md-5 after the close, the channelInactive is called, and the channelwrapper is marked as closed. so closing the channel with the disconnect methode is unnecessary. this pr removes the disconnect method calls and tries to send the kick packet instantly so the client has a chance to see the kick message |
checking if its possible to send a kick message and sending it to the client is useless here as it would call the delayed close method that would send the packet 250ms delayed but the handlerboss would close it immediately. Also no need to call the channelwrapper close method here because the handler boss will close as i said and we only need to mark closed