https://kotlinlang.org logo
#ktor
Title
# ktor
n

natario1

06/16/2021, 2:17 PM
What's the correct way to make a network request inside
bearer.refreshTokens { }
when using the Auth plugin? I'm trying to hit server from there using the same client that initiated the failed request, but I get a deadlock with both requests stuck. If I use a different
HttpClient
only inside
refreshTokens { }
, everything works fine 😕
r

Rustam Siniukov

06/16/2021, 2:23 PM
That’s a known issue. Will be fixed in 1.6.1
👍 2
👍🏼 1
👀 1
n

natario1

06/16/2021, 2:25 PM
Thanks a lot, is there any known workaround? Maybe for the refresh endpoint, return false in
sendWithoutRequest
? I'm not sure what's happening under the hood.
r

Rustam Siniukov

06/16/2021, 2:26 PM
No, not really. Only using separate client for now
n

natario1

06/16/2021, 2:27 PM
Thanks!