Skip to content
This repository was archived by the owner on Dec 10, 2025. It is now read-only.

Commit 33e8944

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 44ffd7d + 6dd0238 commit 33e8944

File tree

2 files changed

+23
-12
lines changed
  • surf-cloud-core

2 files changed

+23
-12
lines changed

surf-cloud-core/surf-cloud-core-client/src/main/kotlin/dev/slne/surf/cloud/core/client/sync/SyncRegistryImpl.kt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import dev.slne.surf.cloud.core.common.netty.network.protocol.running.SyncSetDel
88
import dev.slne.surf.cloud.core.common.netty.network.protocol.running.SyncValueChangePacket
99
import dev.slne.surf.cloud.core.common.sync.BasicSyncValue
1010
import dev.slne.surf.cloud.core.common.sync.CommonSyncRegistryImpl
11+
import dev.slne.surf.cloud.core.common.sync.SyncSetImpl
1112
import dev.slne.surf.surfapi.core.api.util.logger
1213
import dev.slne.surf.surfapi.core.api.util.mutableObject2LongMapOf
1314
import dev.slne.surf.surfapi.core.api.util.synchronize
@@ -22,6 +23,16 @@ class SyncRegistryImpl : CommonSyncRegistryImpl() {
2223
SyncValueChangePacket(CloudProperties.SERVER_NAME, syncValue).fireAndForget()
2324
}
2425

26+
override fun <T> afterChange(
27+
syncSet: SyncSetImpl<T>,
28+
added: Boolean,
29+
changeId: Long,
30+
element: T
31+
) {
32+
super.afterChange(syncSet, added, changeId, element)
33+
SyncSetDeltaPacket(syncSet, added, changeId, element).fireAndForget()
34+
}
35+
2536
fun applyBatchSyncValue(syncValues: List<Pair<String, Any?>>) {
2637
require(frozen) { "SyncRegistry is not frozen, cannot apply batch" }
2738

surf-cloud-core/surf-cloud-core-common/src/main/kotlin/dev/slne/surf/cloud/core/common/netty/network/DisconnectionDetails.kt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,18 @@ enum class DisconnectReason(
2929
val message: String,
3030
val shouldRestart: Boolean = true
3131
) {
32-
UNKNOWN(1, "Disconnected", true),
33-
TIMEOUT(2, "Timed out", true),
34-
INTERNAL_EXCEPTION(3, "Internal exception", true),
35-
END_OF_STREAM(4, "End of stream", true),
36-
SERVER_ID_FETCHED(5, "Server ID fetched", false),
37-
CLIENT_SHUTDOWN(6, "Client shutdown", false),
38-
CLIENT_NAME_ALREADY_EXISTS(7, "Client name already exists", false),
39-
SERVER_SHUTDOWN(8, "Server is shutting down", true),
40-
OUTDATED_SERVER(9, "Outdated server", false),
41-
OUTDATED_CLIENT(10, "Outdated client", false),
42-
PROXY_ALREADY_CONNECTED(11, "Proxy already connected", false),
43-
TOOK_TOO_LONG(12, "Took too long to log in", false);
32+
UNKNOWN(0, "Disconnected", true),
33+
TIMEOUT(1, "Timed out", true),
34+
INTERNAL_EXCEPTION(2, "Internal exception", true),
35+
END_OF_STREAM(3, "End of stream", true),
36+
SERVER_ID_FETCHED(4, "Server ID fetched", false),
37+
CLIENT_SHUTDOWN(5, "Client shutdown", false),
38+
CLIENT_NAME_ALREADY_EXISTS(6, "Client name already exists", false),
39+
SERVER_SHUTDOWN(7, "Server is shutting down", true),
40+
OUTDATED_SERVER(8, "Outdated server", false),
41+
OUTDATED_CLIENT(9, "Outdated client", false),
42+
PROXY_ALREADY_CONNECTED(10, "Proxy already connected", false),
43+
TOOK_TOO_LONG(11, "Took too long to log in", false);
4444

4545
companion object {
4646
val BY_ID = ByIdMap.continuous(

0 commit comments

Comments
 (0)