You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Find the log statement: psql_connection_id=0 psql_error=PSQLError – Generic description to prevent accidental leakage of sensitive data. For debugging details, use String(reflecting: error). [PostgresNIO] Cleaning up and closing connection.
Expected behavior
I would expect not to see an error in the log statement when the connection was closed successfully.
Environment
PostgresNIO version: 1.18.1
OS version: macOS 14.0 (23A344)
Additional context
I can see that closeConnectionAndCleanup already treats the error code clientConnectionClosed a special since it doesn't fire an error for it:
Describe the bug
When successfully closing a connection,
PostgresNIO
includes a misleading "error" in its log statement.To Reproduce
Steps to reproduce the behavior:
PostgresChannelHandler
: https://github.com/vapor/postgres-nio/blob/1.18.1/Sources/PostgresNIO/New/PostgresChannelHandler.swift#L566.trace
or.debug
connection.close()
cleanup.error
psql_connection_id=0 psql_error=PSQLError – Generic description to prevent accidental leakage of sensitive data. For debugging details, use String(reflecting: error). [PostgresNIO] Cleaning up and closing connection.
Expected behavior
I would expect not to see an error in the log statement when the connection was closed successfully.
Environment
Additional context
I can see that
closeConnectionAndCleanup
already treats the error codeclientConnectionClosed
a special since it doesn't fire an error for it:postgres-nio/Sources/PostgresNIO/New/PostgresChannelHandler.swift
Line 579 in abca6b3
Perhaps the log statement could also conditionally exclude the error metadata if the code is
clientConnectionClosed
?The text was updated successfully, but these errors were encountered: