File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
Sources/PostgresConnectionPool Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,12 @@ public actor PostgresConnectionPool {
154154 }
155155 }
156156
157- try ? await connection. close ( )
157+ do {
158+ try await connection. close ( )
159+ }
160+ catch {
161+ logger. warning ( " [ \( poolName) ] connection.close() error: \( error) " )
162+ }
158163 }
159164 }
160165 connections. removeAll ( )
@@ -212,9 +217,9 @@ public actor PostgresConnectionPool {
212217 return
213218 }
214219
215- do {
216- poolConnection. state = . active( Date ( ) )
220+ poolConnection. state = . active( Date ( ) )
217221
222+ do {
218223 // Connection check, etc.
219224 if let onReturnConnection = onReturnConnection {
220225 try await onReturnConnection ( connection, logger)
@@ -237,7 +242,12 @@ public actor PostgresConnectionPool {
237242 }
238243 }
239244
240- try ? await connection. close ( )
245+ do {
246+ try await connection. close ( )
247+ }
248+ catch {
249+ logger. warning ( " [ \( poolName) ] connection.close() error: \( error) " )
250+ }
241251 }
242252 }
243253 }
You can’t perform that action at this time.
0 commit comments