Compare commits

...

10 Commits
0.5.3 ... 0.5.5

4 changed files with 16 additions and 6 deletions

View File

@@ -1,5 +1,15 @@
# Changelog
## 0.5.5
* `Versions`
* `Ktor`: `1.5.4` -> `1.6.0`
## 0.5.4
* `Versions`:
* `Klock`: `2.1.0` -> `2.1.2`
## 0.5.3
* `Versions`:

View File

@@ -38,7 +38,7 @@ inline fun CoroutineScope.createSafeActionsActor(
suspend fun <T> Channel<suspend () -> Unit>.doWithSuspending(
action: ActorAction<T>
) = suspendCoroutine<T> {
offer {
trySend {
safely({ e -> it.resumeWithException(e) }) {
it.resume(action())
}

View File

@@ -12,9 +12,9 @@ kotlin_coroutines_version=1.5.0
kotlin_serialisation_core_version=1.2.1
kotlin_exposed_version=0.31.1
ktor_version=1.5.4
ktor_version=1.6.0
klockVersion=2.1.0
klockVersion=2.1.2
github_release_plugin_version=2.2.12
@@ -45,5 +45,5 @@ dokka_version=1.4.32
# Project data
group=dev.inmo
version=0.5.3
android_code_version=44
version=0.5.5
android_code_version=46

View File

@@ -10,7 +10,7 @@ import kotlinx.coroutines.flow.collect
import kotlinx.serialization.SerializationStrategy
private suspend fun DefaultWebSocketSession.checkReceivedAndCloseIfExists() {
if (incoming.poll() != null) {
if (incoming.tryReceive() != null) {
close()
throw CorrectCloseException
}