jozefdransfield
08/24/2020, 8:11 PMaddamsson
08/26/2020, 8:51 AMwatch
to work in Ktor? I've been trying for ages but it never works. Right now I get Module function provided as lambda cannot be unlinked for reload
even though I copied the exact same code from the documentation site:
fun main(args: Array<String>) {
embeddedServer(
Netty,
watchPaths = listOf("mydir"),
port = PORT,
module = Application::module
).start(true)
}
What am I doing wrong?bitkid
08/26/2020, 2:11 PMwellingtoncosta
08/26/2020, 2:24 PMKotlinxSerializer
is missing. Is there a way to solve this?rrva
08/26/2020, 3:02 PM-javaagent:kotlinx-coroutines-debug-1.3.9.jar
and DebugProbes.dumpCoroutines
the coroutines running ktor client requests are not showing up… is there some case of how coroutines are created that are missing in the agent instrumentation?gotoOla
08/26/2020, 8:35 PMcompile "io.ktor:ktor-client-apache:1.2.3"
in a full fledged ktor project we have. We've been quite happy with it but lately it seems some services detoriate over time and we start to see IO: Connection reset by peer
. Now my first approach was to check the server that is receiving the calls we are making (if they were being ddosed by us, potential downtime etc) but it seems that the http call doesn't even leave us. Given the detoriation over time my mind goes towards stale connection or something of that sort. Has anybody else experienced this kind of issue?rrva
08/27/2020, 9:22 AMNicolas Bourdin
08/27/2020, 9:37 AMmanlan
08/27/2020, 7:40 PMYour current kotlinx.serialization core version is too low, while current Kotlin compiler plugin 1.4.0 requires at least 1.0-M1-SNAPSHOT. Please update your kotlinx.serialization runtime dependency.
This is what I see after upgrading to 1.4.0zero_coding
08/28/2020, 12:06 PMktor {
deployment {
port = 8080
port = ${?PORT}
watch = [ user-svc ]
}
application {
modules = [ io.databaker.ApplicationKt.module ]
}
}
zero_coding
08/28/2020, 12:08 PM./gradlew -t installDist .
FAILURE: Build failed with an exception.
* What went wrong:
Task '.' not found in root project 'user-svc'.
* Try:
Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at <https://help.gradle.org>
BUILD FAILED in 409ms
zero_coding
08/28/2020, 12:45 PMGunslingor
08/29/2020, 1:38 AMwithTestApplication(Application::commonFeatures AND Application::someotherFeatures)
basher
08/29/2020, 1:57 AMGunslingor
08/29/2020, 11:40 PMzero_coding
08/30/2020, 6:04 PMefemoney
08/31/2020, 3:08 AM/**
* Compose multiple pipeline [interceptors] into one. This executes [interceptors] in a new pipeline running in this
* interceptors context on this interceptors subject
*
* @return A [PipelineInterceptor] that executes other [interceptors] in a pipeline within its own context on its own subject
* @param interceptors [PipelineInterceptor]s to execute **serially**
*/
fun <TSubject : Any, TContext : Any> compose(
vararg interceptors: PipelineInterceptor<TSubject, TContext>
): PipelineInterceptor<TSubject, TContext> = {
val pipeline = Pipeline(PipelinePhase("Compose"), interceptors.asList())
pipeline.execute(context, subject)
}
with usage:
route("/api") {
get("/comics", GetAllComics)
get("/comics/{page}", GetComicPage)
get("/comics/latest", GetComicLatest)
put("/users/token", compose(AuthenticateUser, SaveUserToken))
put("/users/page", compose(AuthenticateUser, SaveUserPage))
}
I am trying to get the same behavior as nodejs’s express
interceptors.gotoOla
08/31/2020, 9:30 AMHelio
08/31/2020, 10:33 PMKris Wong
09/01/2020, 8:58 PMHyun
09/01/2020, 9:57 PM1.3.9-native-mt
class TestFreezingViewModel(val client: HttpClient) {
fun call() {
CoroutineScope(Dispatchers.Main).launch(start = CoroutineStart.LAZY) {
try {
client.get<String>("<https://test.com>") {}
} catch (e: Throwable) {
e.printStackTrace()
}
}.start()
}
}
// swift side code
TestFreezingViewModel().call()
while the code running, The error(on the slack thread) occurs
when Coroutine’s invokeOnCompletion
is invoked, freeze() is called.
and it tells that HttpClient
can’t be frozen
When I checked the source code
HttpClient.init calls preventFreeze()
I would like to know the intention of preventFreeze
and what is the proper approach to use on developer’s side.
Is there some advice?Hyun
09/02/2020, 4:42 AMzero_coding
09/02/2020, 10:06 AMOvsyannikov Alexey
09/02/2020, 3:22 PMKris Wong
09/02/2020, 4:43 PMKris Wong
09/02/2020, 7:36 PMmanlan
09/03/2020, 4:05 AMbitkid
09/03/2020, 8:58 AMlouiscad
09/03/2020, 3:26 PMzero_coding
09/03/2020, 7:10 PM