diff --git a/pom.xml b/pom.xml index 7ade7c5..412fe36 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.github.immueggpain bettermultiplayer - 0.3.8 + 0.3.9 UTF-8 diff --git a/src/main/java/com/github/immueggpain/bettermultiplayer/BMPPeer.java b/src/main/java/com/github/immueggpain/bettermultiplayer/BMPPeer.java index f6ea629..0bf0a46 100644 --- a/src/main/java/com/github/immueggpain/bettermultiplayer/BMPPeer.java +++ b/src/main/java/com/github/immueggpain/bettermultiplayer/BMPPeer.java @@ -68,8 +68,9 @@ public Void call() throws Exception { // start ovpn startOvpnProcess(Launcher.LOCAL_PORT); - recvOvpnThread.join(); - recvServerThread.join(); + // no need to join, if ovpn process exits, we exit too. + // recvOvpnThread.join(); + // recvServerThread.join(); return null; } diff --git a/src/main/java/com/github/immueggpain/bettermultiplayer/BMPUDPHub.java b/src/main/java/com/github/immueggpain/bettermultiplayer/BMPUDPHub.java index 4c50435..2cca759 100644 --- a/src/main/java/com/github/immueggpain/bettermultiplayer/BMPUDPHub.java +++ b/src/main/java/com/github/immueggpain/bettermultiplayer/BMPUDPHub.java @@ -54,6 +54,7 @@ private void recv_thread(int listen_port) { p.setData(recvBuf); socket.receive(p); InetSocketAddress saddr = (InetSocketAddress) p.getSocketAddress(); + System.out.println("recv from " + saddr); updatePlayerInfo(saddr, System.currentTimeMillis()); broadcastPacket(saddr, p); } @@ -101,6 +102,7 @@ private void broadcastPacket(InetSocketAddress source, DatagramPacket p) { p.setSocketAddress(dest); try { socket.send(p); + System.out.println("send to " + dest); } catch (IOException e) { e.printStackTrace(); } diff --git a/src/main/java/com/github/immueggpain/bettermultiplayer/Launcher.java b/src/main/java/com/github/immueggpain/bettermultiplayer/Launcher.java index be4881b..34facb0 100644 --- a/src/main/java/com/github/immueggpain/bettermultiplayer/Launcher.java +++ b/src/main/java/com/github/immueggpain/bettermultiplayer/Launcher.java @@ -10,7 +10,7 @@ version = Launcher.VERSTR, subcommands = { HelpCommand.class, BMPUDPHub.class, BMPPeer.class }) public class Launcher implements Callable { - public static final String VERSTR = "0.3.8"; + public static final String VERSTR = "0.3.9"; public static final int LOCAL_PORT = 2233; public static final int LOCAL_OVPN_PORT = 1194;