mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-20 14:08:57 +01:00
Hid stacktrace for socket exceptions.
This commit is contained in:
parent
5dfe732f18
commit
d156fcf9c8
1 changed files with 15 additions and 0 deletions
|
@ -9,6 +9,11 @@ import java.util.HashSet;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
// CraftBukkit start
|
||||||
|
import java.net.SocketException;
|
||||||
|
import java.net.SocketTimeoutException;
|
||||||
|
// CraftBukkit end
|
||||||
|
|
||||||
public abstract class Packet {
|
public abstract class Packet {
|
||||||
|
|
||||||
private static Map a = new HashMap();
|
private static Map a = new HashMap();
|
||||||
|
@ -84,6 +89,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) e.get(Integer.valueOf(i));
|
PacketCounter packetcounter = (PacketCounter) e.get(Integer.valueOf(i));
|
||||||
|
|
||||||
if (packetcounter == null) {
|
if (packetcounter == null) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue