Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void c() {
- List list = this.h;
- synchronized (this.h) {
- // Spigot Start
- // This prevents players from 'gaming' the server, and strategically relogging to increase their position in the tick order
- if ( org.spigotmc.SpigotConfig.playerShuffle > 0 && MinecraftServer.currentTick % org.spigotmc.SpigotConfig.playerShuffle == 0 )
- {
- Collections.shuffle( this.h );
- }
- // Spigot End
- Iterator iterator = this.h.iterator();
- while (iterator.hasNext()) {
- final NetworkManager networkmanager = (NetworkManager) iterator.next(); // LINE 136
- if (!networkmanager.h()) {
- if (!networkmanager.g()) {
- // Spigot Start
- // Fix a race condition where a NetworkManager could be unregistered just before connection.
- if (networkmanager.preparing) continue;
- // Spigot End
- iterator.remove();
- networkmanager.l();
- } else {
- try {
- networkmanager.a();
- } catch (Exception exception) {
- if (networkmanager.c()) {
- CrashReport crashreport = CrashReport.a(exception, "Ticking memory connection");
- CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Ticking connection");
- crashreportsystemdetails.a("Connection", new Callable() {
- public String a() throws Exception {
- return networkmanager.toString();
- }
- public Object call() throws Exception {
- return this.a();
- }
- });
- throw new ReportedException(crashreport);
- }
- ServerConnection.e.warn("Failed to handle packet for " + networkmanager.getSocketAddress(), exception);
- final ChatComponentText chatcomponenttext = new ChatComponentText("Internal server error");
- networkmanager.a(new PacketPlayOutKickDisconnect(chatcomponenttext), new GenericFutureListener() {
- public void operationComplete(Future future) throws Exception {
- networkmanager.close(chatcomponenttext);
- }
- }, new GenericFutureListener[0]);
- networkmanager.k();
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement