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
This commit is contained in:
PSp..om 2011-03-24 19:31:30 +00:00
parent 73305755bc
commit 7e3020fd07

View File

@ -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 );