quit back to the server select screen and rejoin the server without having to close the client

This commit is contained in:
Fate-JH 2023-08-07 20:36:43 -04:00
parent c9a14527ea
commit 2446a844e5

View file

@ -505,16 +505,14 @@ class MiddlewareActor(
case Teardown() => case Teardown() =>
send(TeardownConnection(clientNonce)) send(TeardownConnection(clientNonce))
close() close()
Behaviors.same
case Close() => case Close() =>
close() close()
Behaviors.same
} }
.receiveSignal(onSignal) .receiveSignal(onSignal)
} }
private def close(): Unit = { private def close(): Behavior[Command] = {
outQueue outQueue
.dequeueAll(_ => true) .dequeueAll(_ => true)
.foreach(p => send(smp(slot = 0, p._2.bytes), Some(nextSequence), crypto)) .foreach(p => send(smp(slot = 0, p._2.bytes), Some(nextSequence), crypto))