paranoia
This commit is contained in:
parent
2d3c080002
commit
da9efdb765
@ -525,9 +525,12 @@ class ServerConnection(val server: StarboundServer, type: ConnectionType) : Conn
|
|||||||
private val isDisconnecting = AtomicBoolean()
|
private val isDisconnecting = AtomicBoolean()
|
||||||
|
|
||||||
private suspend fun disconnect0(reason: String) {
|
private suspend fun disconnect0(reason: String) {
|
||||||
// initiate shipworld shutdown
|
// make server forget shipworld right away
|
||||||
|
// This should account for extremely unlikely case
|
||||||
|
// where client initiated disconnect,
|
||||||
|
// and reconnects before this function finishes running
|
||||||
if (::shipWorld.isInitialized) {
|
if (::shipWorld.isInitialized) {
|
||||||
shipWorld.eventLoop.shutdown()
|
server.notifyWorldUnloaded(shipWorld.worldID)
|
||||||
}
|
}
|
||||||
|
|
||||||
// stop being counted towards player count, vanish from connection list
|
// stop being counted towards player count, vanish from connection list
|
||||||
|
Loading…
Reference in New Issue
Block a user