Skip to content

Commit 405f85b

Browse files
committed
fixed issue with time delta adjustment
1 parent 8171ede commit 405f85b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stormfront/src/main/kotlin/cc/warlock/warlock3/stormfront/network/StormfrontClient.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ class StormfrontClient(host: String, port: Int) : WarlockClient {
133133
println("adjusted delta ahead to $delta")
134134
} else if (newTime < currentTime - 1000L) {
135135
// We're more than 1s fast
136-
delta = System.currentTimeMillis() + 1000L - newTime
136+
delta = newTime - System.currentTimeMillis() + 1000L
137137
println("adjusted delta back to $delta")
138138
}
139139
}

0 commit comments

Comments
 (0)