libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit c3de34f3dae63fd969ee37a01aed90968474cdc1
parent 4f1525107159cd7f92c18e8060f0333a9c3055b4
Author: MS <ms@taler.net>
Date:   Fri, 31 Mar 2023 14:44:35 +0200

Closing PG connection in more places.

Diffstat:
Mutil/src/main/kotlin/DB.kt | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/util/src/main/kotlin/DB.kt b/util/src/main/kotlin/DB.kt @@ -110,14 +110,17 @@ class PostgresListenHandle(val channelName: String) { val maybeNotifications = this.conn.getNotifications(timeoutMs.toInt()) if (maybeNotifications == null || maybeNotifications.isEmpty()) { logger.debug("DB notification channel $channelName was found empty.") + conn.close() return false } for (n in maybeNotifications) { if (n.name.lowercase() != channelName.lowercase()) { + conn.close() throw internalServerError("Channel $channelName got notified from ${n.name}!") } } logger.debug("Found DB notifications on channel $channelName") + conn.close() return true } } \ No newline at end of file