Skip to content

Commit

Permalink
disable observer
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasForst committed Oct 7, 2020
1 parent 84e3225 commit 0a3ab8d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/main/kotlin/com/wire/bots/polls/setup/HttpClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import io.ktor.client.features.logging.LogLevel
import io.ktor.client.features.logging.Logger
import io.ktor.client.features.logging.Logging
import io.ktor.client.features.observer.ResponseObserver
import io.ktor.utils.io.discard
import io.micrometer.core.instrument.MeterRegistry


Expand All @@ -24,10 +23,12 @@ fun createHttpClient(meterRegistry: MeterRegistry) =
}

// TODO check https://github.com/ktorio/ktor/issues/1813
install(ResponseObserver) {
onResponse {
meterRegistry.httpCall(it)
it.content.discard()
@Suppress("ConstantConditionIf") // temporary disabled until https://github.com/ktorio/ktor/issues/1813 is resolved
if (false) {
install(ResponseObserver) {
onResponse {
meterRegistry.httpCall(it)
}
}
}

Expand Down

0 comments on commit 0a3ab8d

Please sign in to comment.