summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorEvilSeph <evilseph@unaligned.org>2011-06-07 01:29:55 -0400
committerEvilSeph <evilseph@unaligned.org>2011-06-07 01:29:55 -0400
commit9fde27bfcd7cfaa056d73459316aabde1fcb7ce7 (patch)
tree2dca51677c26f23657b1669c203f3e2418e65cc4 /src/main
parent6bd509ebdeb82ccf704f68b62dbbd691c9bc1d10 (diff)
downloadcraftbukkit-9fde27bfcd7cfaa056d73459316aabde1fcb7ce7.tar
craftbukkit-9fde27bfcd7cfaa056d73459316aabde1fcb7ce7.tar.gz
craftbukkit-9fde27bfcd7cfaa056d73459316aabde1fcb7ce7.tar.lz
craftbukkit-9fde27bfcd7cfaa056d73459316aabde1fcb7ce7.tar.xz
craftbukkit-9fde27bfcd7cfaa056d73459316aabde1fcb7ce7.zip
Fixed IPv6 support in NetworkManager.
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/net/minecraft/server/NetworkManager.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
index f32ec799..230f7a15 100644
--- a/src/main/java/net/minecraft/server/NetworkManager.java
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
@@ -10,6 +10,9 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+// CraftBukkit
+import java.net.SocketException;
+
public class NetworkManager {
public static final Object a = new Object();
@@ -43,11 +46,16 @@ public class NetworkManager {
this.i = socket.getRemoteSocketAddress();
this.p = nethandler;
+ // CraftBukkit start - IPv6 stack in Java on BSD/OSX doesn't support setTrafficClass
try {
- socket.setSoTimeout(30000);
socket.setTrafficClass(24);
+ } catch (SocketException e) {
+ }
+ // CraftBukkit end
+ try {
// CraftBukkit start - cant compile these outside the try
+ socket.setSoTimeout(30000);
this.input = new DataInputStream(socket.getInputStream());
this.output = new DataOutputStream(new BufferedOutputStream(socket.getOutputStream(), 5120));
// CraftBukkit end