Changed disconnect on error to call ChannelHandlerContext#close()

This commit is contained in:
Collin Smith
2020-06-27 16:34:08 -07:00
parent 98521ad40c
commit e05e9bebc6

View File

@ -162,7 +162,7 @@ public class Main extends ApplicationAdapter implements PacketProcessor {
assert id != MAX_CLIENTS : "no available client slots. connection limiter should have caught this";
if (id == MAX_CLIENTS) {
Gdx.app.error(TAG, " " + "client connected, but no slot is available");
ctx.channel().close(); // TODO: does this work on a UDP? (connectionless)
ctx.close();
return;
}