public final void forceClose(final BaseWritePacket packet) { _authed = false; try { super.close(packet); } catch (IOException e) { _log.log( Level.INFO, "CommunityServerThread: Failed disconnecting server, server already disconnected: " + e.getMessage(), e); } }
public boolean sendPacket(final BaseWritePacket packet, final boolean needAuth) { if (needAuth && !_authed) { return false; } try { super.write(packet); } catch (IOException e) { _log.log( Level.INFO, "CommunityServerThread: Failed sending TCP packet: " + e.getMessage(), e); return false; } return true; }