Revert "more annotations to god of annotations"

This reverts commit f8a8808508.
This commit is contained in:
2020-10-16 19:40:04 +06:00
parent 893fd1ac07
commit 90c1731bd1
52 changed files with 9 additions and 222 deletions

View File

@@ -9,6 +9,13 @@ import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.collect
import kotlinx.serialization.SerializationStrategy
private suspend fun DefaultWebSocketSession.checkReceivedAndCloseIfExists() {
if (incoming.poll() != null) {
close()
throw CorrectCloseException
}
}
fun <T> Route.includeWebsocketHandling(
suburl: String,
flow: Flow<T>,