From d6dbe5de92b0a42f74f18d9d4a590517e27df807 Mon Sep 17 00:00:00 2001 From: Edoardo La Greca Date: Thu, 7 Aug 2025 20:17:19 +0200 Subject: change flush to use exceptions instead of error strings --- src/main/kotlin/Connection.kt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/main/kotlin/Connection.kt') diff --git a/src/main/kotlin/Connection.kt b/src/main/kotlin/Connection.kt index cde7863..5fabf83 100644 --- a/src/main/kotlin/Connection.kt +++ b/src/main/kotlin/Connection.kt @@ -107,7 +107,7 @@ class Connection(transLay: TransportLayer) : ProtocolTranslator { TODO("Not yet implemented") } - override fun flush(oldtag: UShort): String? { + override fun flush(oldtag: UShort) { val omsg = OutMessage(NinePMessageType.TFLUSH, this.tagGen.generate(), listOf("oldtag"), mapOf( "oldtag" to BigInteger(oldtag.toString()) @@ -117,11 +117,7 @@ class Connection(transLay: TransportLayer) : ProtocolTranslator { this.maxSize ) omsg.write(this.tl) - val checkErr = checkedInMessage(omsg.tag) - if (checkErr.first != null) { - return checkErr.first - } - return null + val imsg = checkedInMessage(omsg.tag) } override fun attach(fid: UInt, afid: UInt, uname: String, aname: String): String? { -- cgit v1.2.3