Skip to content

Commit bd3d7a4

Browse files
committed
Throw error when re-connecting is failed
1 parent 7c487a1 commit bd3d7a4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/black/bracken/seichienvoy/PlayerDataSynchronizer.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ class PlayerDataSynchronizer(private val synchronizingOriginNames: Set<String>)
5858
if (serverSwitchWaitingMap[player.name] !is PlayerDataUnloaded) return
5959

6060
serverSwitchWaitingMap.remove(player.name)
61-
player.connect(event.cancelServer)
61+
player.connect(event.cancelServer) { isSucceed, exception ->
62+
if (!isSucceed) throw exception
63+
}
6264
}
6365

6466
@Suppress("unused")

0 commit comments

Comments
 (0)