by default, the server only expect udp on 51000 and 51001; let's keep to that by default (#1209)

This commit is contained in:
Fate-JH 2024-07-02 13:01:35 -04:00 committed by GitHub
parent 6d1530c311
commit 5990f247c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 8 deletions

View file

@ -20,7 +20,7 @@ login {
world {
# UDP listening port
port = 51001
ports = [51003, 51004, 51005, 51006, 51007, 51008, 51009, 51010]
ports = []
# The name of the server as displayed in the server browser.
server-name = PSForever

View file

@ -27,11 +27,11 @@ import scala.concurrent.duration._
import scala.util.matching.Regex
import scala.util.{Failure, Success}
object LoginActor {
sealed trait Command
private case object UpdateServerList extends Command
final case class ReceptionistListing(listing: Receptionist.Listing) extends Command
}
@ -41,8 +41,6 @@ class LoginActor(middlewareActor: typed.ActorRef[MiddlewareActor.Command], conne
import scala.concurrent.ExecutionContext.Implicits.global
private case class UpdateServerList()
val usernameRegex: Regex = """[A-Za-z0-9]{3,}""".r
var leftRef: ActorRef = Default.Actor
@ -83,7 +81,7 @@ class LoginActor(middlewareActor: typed.ActorRef[MiddlewareActor.Command], conne
canonicalHostName = address.CanonicalHostName
port = address.Port
case UpdateServerList() =>
case LoginActor.UpdateServerList =>
updateServerList()
case packet: PlanetSideGamePacket =>
@ -213,7 +211,7 @@ class LoginActor(middlewareActor: typed.ActorRef[MiddlewareActor.Command], conne
}
loginSuccessfulResponse(username, newToken)
updateServerListTask =
context.system.scheduler.scheduleWithFixedDelay(0 seconds, 5 seconds, self, UpdateServerList())
context.system.scheduler.scheduleWithFixedDelay(0 seconds, 5 seconds, self, LoginActor.UpdateServerList)
future
case (_, false) =>
@ -271,7 +269,7 @@ class LoginActor(middlewareActor: typed.ActorRef[MiddlewareActor.Command], conne
)
loginSuccessfulResponseToken(account.username, token, newToken)
updateServerListTask =
context.system.scheduler.scheduleWithFixedDelay(0 seconds, 5 seconds, self, UpdateServerList())
context.system.scheduler.scheduleWithFixedDelay(0 seconds, 5 seconds, self, LoginActor.UpdateServerList)
future
case (_, false) =>