Browse Source

Forgot to actually check the udp port for server
creation... now it properly disables UDP for -1.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7107 75d07b2b-3a1a-0410-a2c5-0572b91ccdca

PSp..om 14 years ago
parent
commit
7e3020fd07
1 changed files with 1 additions and 1 deletions
  1. 1 1
      engine/src/networking/com/jme3/network/Network.java

+ 1 - 1
engine/src/networking/com/jme3/network/Network.java

@@ -90,7 +90,7 @@ public class Network
      */
      */
     public static Server createServer( String gameName, int version, int tcpPort, int udpPort ) throws IOException
     public static Server createServer( String gameName, int version, int tcpPort, int udpPort ) throws IOException
     {
     {
-        UdpKernel fast = new UdpKernel(udpPort);
+        UdpKernel fast = udpPort == -1 ? null : new UdpKernel(udpPort);
         SelectorKernel reliable = new SelectorKernel(tcpPort);
         SelectorKernel reliable = new SelectorKernel(tcpPort);
  
  
         return new DefaultServer( gameName, version, reliable, fast );       
         return new DefaultServer( gameName, version, reliable, fast );