From 2023a7f6e36a408ee61afea1148053a49b06eb35 Mon Sep 17 00:00:00 2001 From: Edoardo La Greca Date: Fri, 1 Aug 2025 17:01:40 +0200 Subject: add throws info in documentation and remove initializer in waitForTag --- src/main/kotlin/NinePConnection.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/kotlin/NinePConnection.kt b/src/main/kotlin/NinePConnection.kt index ccac9c5..3c7c622 100644 --- a/src/main/kotlin/NinePConnection.kt +++ b/src/main/kotlin/NinePConnection.kt @@ -96,11 +96,12 @@ class NinePConnection(netPackTrans: NetworkPacketTransporter) : NinePTranslator * * @param tag The tag to wait for. * @return A pair of (1) the size and (2) the type of the message that matches the given tag. + * @throws java.io.IOException if the message could not be correctly received. */ private fun waitForTag(tag: UShort): Pair { var s = 0u var ty: NinePMessageType? = null - var ta: UShort = 0u + var ta: UShort var found = false while (!found) { val stt = readSizeTypeTag() -- cgit v1.2.3