gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libeufin] branch master updated: Closing PG connection in more places.


From: gnunet
Subject: [libeufin] branch master updated: Closing PG connection in more places.
Date: Fri, 31 Mar 2023 14:45:11 +0200

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository libeufin.

The following commit(s) were added to refs/heads/master by this push:
     new c3de34f3 Closing PG connection in more places.
c3de34f3 is described below

commit c3de34f3dae63fd969ee37a01aed90968474cdc1
Author: MS <ms@taler.net>
AuthorDate: Fri Mar 31 14:44:35 2023 +0200

    Closing PG connection in more places.
---
 util/src/main/kotlin/DB.kt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/util/src/main/kotlin/DB.kt b/util/src/main/kotlin/DB.kt
index 90189257..a4ccbda3 100644
--- 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

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]