Commit 7c4ca94b authored by Mygod's avatar Mygod

Throw appropriate exception on not running

parent 1588dec9
...@@ -82,7 +82,7 @@ class ChannelMonitor : Thread("ChannelMonitor") { ...@@ -82,7 +82,7 @@ class ChannelMonitor : Thread("ChannelMonitor") {
else -> throw IOException("Failed to register in the channel") else -> throw IOException("Failed to register in the channel")
} }
} }
if (!running) throw ClosedChannelException() if (!running) throw CancellationException()
return registration.result.await() return registration.result.await()
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment