Don't flush when writing universe time packet
This commit is contained in:
parent
32b8c4e6d5
commit
46900554c3
@ -87,10 +87,10 @@ class ServerChannels(val server: StarboundServer) : Closeable {
|
||||
}
|
||||
}
|
||||
|
||||
fun broadcast(packet: IPacket) {
|
||||
fun broadcast(packet: IPacket, flush: Boolean = true) {
|
||||
connections.forEach {
|
||||
if (it.isReady) {
|
||||
it.send(packet)
|
||||
it.send(packet, flush)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -187,7 +187,7 @@ sealed class StarboundServer(val root: File) : BlockableEventLoop("Server thread
|
||||
|
||||
init {
|
||||
scheduleAtFixedRate(Runnable {
|
||||
channels.broadcast(UniverseTimeUpdatePacket(universeClock.time))
|
||||
channels.broadcast(UniverseTimeUpdatePacket(universeClock.time), false)
|
||||
}, Globals.universeServer.clockUpdatePacketInterval, Globals.universeServer.clockUpdatePacketInterval, TimeUnit.MILLISECONDS)
|
||||
|
||||
scheduleAtFixedRate(Runnable {
|
||||
|
Loading…
Reference in New Issue
Block a user