mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-02 21:17:00 +01:00
Fixed IPv6 support in NetworkManager.
This commit is contained in:
parent
6bd509ebde
commit
9fde27bfcd
1 changed files with 9 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue