mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2025-08-21 05:44:33 +00:00
Prevent nasty connection errors from hitting the console.
This commit is contained in:
parent
c99dc23917
commit
4525d16842
1 changed files with 14 additions and 0 deletions
|
@ -6,6 +6,10 @@ import java.io.EOFException;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
// Craftbukkit start
|
||||||
|
import java.net.SocketException;
|
||||||
|
import java.net.SocketTimeoutException;
|
||||||
|
// Craftbukkit end
|
||||||
|
|
||||||
public abstract class Packet {
|
public abstract class Packet {
|
||||||
|
|
||||||
|
@ -86,6 +90,16 @@ public abstract class Packet {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Craftbukkit start
|
||||||
|
catch (SocketTimeoutException exception) {
|
||||||
|
System.out.println("Read timed out");
|
||||||
|
return null;
|
||||||
|
} catch (SocketException exception) {
|
||||||
|
System.out.println("Connection reset");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
// Craftbukkit end
|
||||||
|
|
||||||
PacketCounter packetcounter = (PacketCounter) c.get(Integer.valueOf(i));
|
PacketCounter packetcounter = (PacketCounter) c.get(Integer.valueOf(i));
|
||||||
|
|
||||||
if (packetcounter == null) {
|
if (packetcounter == null) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue