From 446821a0dce5912978d911589b0cb12bc404eb5f Mon Sep 17 00:00:00 2001
From: Claire <claire.github-309c@sitedethib.com>
Date: Fri, 28 Jul 2023 17:59:31 +0200
Subject: [PATCH] Swap debug statements in streaming server (#26231)

---
 streaming/index.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/streaming/index.js b/streaming/index.js
index 9db23b876..ebdfd1e09 100644
--- a/streaming/index.js
+++ b/streaming/index.js
@@ -822,8 +822,8 @@ const startServer = async () => {
             transmit(event, payload);
           }
         }).catch(err => {
-          releasePgConnection();
           log.error(err);
+          releasePgConnection();
         });
       });
     };