summaryrefslogtreecommitdiff
path: root/nexus/src/main/kotlin/tech
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-06-17 11:45:02 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-06-17 11:47:03 +0530
commitc8a486298cdf7b6428a4536c20e70512da913dc3 (patch)
tree9027c0059652d93af8dc376b174b0a1d5f59fb36 /nexus/src/main/kotlin/tech
parent0f559fc895234dfb9d8a0bb2cdaf4f90f738926e (diff)
downloadlibeufin-c8a486298cdf7b6428a4536c20e70512da913dc3.tar.gz
libeufin-c8a486298cdf7b6428a4536c20e70512da913dc3.tar.bz2
libeufin-c8a486298cdf7b6428a4536c20e70512da913dc3.zip
fix another HTTP client leak
Diffstat (limited to 'nexus/src/main/kotlin/tech')
-rw-r--r--nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt2
-rw-r--r--nexus/src/main/kotlin/tech/libeufin/nexus/taler.kt3
2 files changed, 2 insertions, 3 deletions
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
index 1fbe7e80..af86c005 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
@@ -245,7 +245,7 @@ fun moreFrequentBackgroundTasks(httpClient: HttpClient) {
}
// FIXME: should be done automatically after raw ingestion
reportAndIgnoreErrors { ingestTalerTransactions() }
- reportAndIgnoreErrors { submitPreparedPaymentsViaEbics() }
+ reportAndIgnoreErrors { submitPreparedPaymentsViaEbics(httpClient) }
logger.debug("More frequent background jobs done")
delay(Duration.ofSeconds(1))
}
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/taler.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/taler.kt
index e58b8690..b4d28130 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/taler.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/taler.kt
@@ -379,7 +379,7 @@ private suspend fun talerAddIncoming(call: ApplicationCall, httpClient: HttpClie
// submits ALL the prepared payments from ALL the Taler facades.
// FIXME(dold): This should not be done here.
-suspend fun submitPreparedPaymentsViaEbics() {
+suspend fun submitPreparedPaymentsViaEbics(httpClient: HttpClient) {
data class EbicsSubmission(
val subscriberDetails: EbicsClientSubscriberDetails,
val pain001document: String
@@ -421,7 +421,6 @@ suspend fun submitPreparedPaymentsViaEbics() {
}
}
}
- val httpClient = HttpClient()
workQueue.forEach {
println("submitting prepared payment via EBICS")
doEbicsUploadTransaction(