-
-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup: Logging and some more #447
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,7 +101,7 @@ final class PostgresChannelHandler: ChannelDuplexHandler { | |
} | ||
|
||
func errorCaught(context: ChannelHandlerContext, error: Error) { | ||
self.logger.debug("Channel error caught.", metadata: [.error: "\(error)"]) | ||
self.logger.debug("Channel error caught.", metadata: [.error: "\(String(reflecting: error))"]) | ||
let action = self.state.errorHappened(.connectionError(underlying: error)) | ||
self.run(action, with: context) | ||
} | ||
|
@@ -563,8 +563,8 @@ final class PostgresChannelHandler: ChannelDuplexHandler { | |
_ cleanup: ConnectionStateMachine.ConnectionAction.CleanUpContext, | ||
context: ChannelHandlerContext | ||
) { | ||
self.logger.debug("Cleaning up and closing connection.", metadata: [.error: "\(cleanup.error)"]) | ||
self.logger.debug("Cleaning up and closing connection.", metadata: [.error: "\(String(reflecting: cleanup.error))"]) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
// 1. fail all tasks | ||
cleanup.tasks.forEach { task in | ||
task.failWithError(cleanup.error) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,6 @@ extension PostgresJSONDecoder { | |
} | ||
} | ||
|
||
//@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 9.0, *) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are some Sendable warning for these 2 JSON-Coder conformances. I didn't try to solve them because someone (Fabian probably?) tried to solve them but apparently stopped at some point (judging by the comment). |
||
extension JSONDecoder: PostgresJSONDecoder {} | ||
|
||
private let jsonDecoderLocked: NIOLockedValueBox<PostgresJSONDecoder> = NIOLockedValueBox(JSONDecoder()) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -803,7 +803,7 @@ final class ConnectionPoolTests: XCTestCase { | |
|
||
pool.connectionReceivedNewMaxStreamSetting(connection, newMaxStreamSetting: 21) | ||
|
||
for (index, request) in requests.enumerated() { | ||
for (_, request) in requests.enumerated() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning for unused variable. |
||
let connection = try await request.future.success | ||
connections.append(connection) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inconsistency with all other log statements.