Skip to content
Snippets Groups Projects
Verified Commit 3d112b91 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Fix bug where a properly closed connection was marked as errored

parent 0a10830f
No related branches found
No related tags found
No related merge requests found
Pipeline #281 passed
......@@ -229,6 +229,8 @@ class CoreConnection(
}
channel?.close()
} catch (e: Throwable) {
val closed = state.value == ConnectionState.CLOSED
var cause: Throwable? = e
var exception: QuasselSecurityException?
do {
......@@ -239,11 +241,13 @@ class CoreConnection(
close()
securityExceptionCallback(exception)
} else {
if (!closed) {
log(WARN, TAG, "Error encountered in connection", e)
log(WARN, TAG, "Last sent message: ${MessageRunnable.lastSent.get()}")
close()
exceptionCallback(e)
}
close()
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment