Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ttl fix attempt

  • Loading branch information...
commit 8730cd4cd0907366ccb87ed954d9489fccd74da4 1 parent 469f9be
@dalkvist authored
Showing with 4 additions and 2 deletions.
  1. +2 −1  project.clj
  2. +2 −1  src/bf3/bl.clj
View
3  project.clj
@@ -34,4 +34,5 @@
:jvm-opts ["-Xms350m" "-Xmx350m" "-server" "-XX:+UseConcMarkSweepGC"
"-XX:+CMSIncrementalMode" "-XX:+UseCompressedOops"
"-XX:+DoEscapeAnalysis" "-XX:+UseBiasedLocking"
- "-XX:PermSize=64M" "-XX:MaxPermSize=85M"])
+ "-XX:PermSize=64M" "-XX:MaxPermSize=85M"
+ "-Djava.net.preferIPv4Stack=true"])
View
3  src/bf3/bl.clj
@@ -279,7 +279,7 @@
(live-info server-ip server-port game-id default-dest-port))
([server-ip server-port game-id dest-port]
(try
- (let [socket (DatagramSocket. dest-port)
+ (let [socket (MulticastSocket. dest-port)
info (live-info server-ip server-port game-id dest-port socket)]
(.close socket)
info)
@@ -303,6 +303,7 @@
ping (DatagramPacket. msg (count msg) ip server-port)
pong (DatagramPacket. (byte-array 16384) 16384)
]
+ (.setTimeToLive socket 125)
(.setSoTimeout socket 1000)
(.send socket ping)
(.disconnect socket)
Please sign in to comment.
Something went wrong with that request. Please try again.