mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-04-06 02:01:58 +02:00
Simpler bytesSkipped check
This commit is contained in:
@@ -135,9 +135,7 @@ class OTAUpdateTask(
|
||||
// for the OK response. Saving time
|
||||
val bytesSkipped = dis.skipBytes(4)
|
||||
// Replicate behaviour of .skipNBytes()
|
||||
if (bytesSkipped == 0) {
|
||||
throw EOFException("Unexpected EOF")
|
||||
} else if (bytesSkipped != 4) {
|
||||
if (bytesSkipped != 4) {
|
||||
throw IOException("Unexpected number of bytes skipped: $bytesSkipped")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user