Skip to content

Commit

Permalink
update swiftlint
Browse files Browse the repository at this point in the history
  • Loading branch information
MacOMNI committed Jan 15, 2025
1 parent b1d7737 commit c10f836
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions Networking/Sources/Networking/Connection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -338,26 +338,21 @@ func presistentStreamRunLoop<Handler: StreamHandler>(
} catch {
logger.error(

Check warning on line 339 in Networking/Sources/Networking/Connection.swift

View check run for this annotation

Codecov / codecov/patch

Networking/Sources/Networking/Connection.swift#L339

Added line #L339 was not covered by tests
"Failed to setup presistent stream",
metadata: ["connectionId": "\(connection.id)", "streamId": "\(stream.id)", "kind": "\(kind)", "error": "\(error)"]
metadata: ["connectionId": "\(connection.id)", "streamId": "\(stream.id)", "error": "\(error)"]

Check warning on line 341 in Networking/Sources/Networking/Connection.swift

View check run for this annotation

Codecov / codecov/patch

Networking/Sources/Networking/Connection.swift#L341

Added line #L341 was not covered by tests
)
}
logger.debug(
"Starting presistent stream run loop",
metadata: ["connectionId": "\(connection.id)", "streamId": "\(stream.id)", "kind": "\(kind)"]
)
var decoder = handler.createDecoder(kind: kind)
var msg = Data()
do {
while let data = try await receiveMaybeData(stream: stream) {
msg = data
let msg = try decoder.decode(data: data)
try await handler.handle(connection: connection, message: msg)
}
} catch {
logger
.error(
"UP stream run loop failed: \(error) remote \(connection.remoteAddress) \(connection.id) \(stream.id) kind: \(kind) data \(msg.toHexString()) bytes \(msg.count)"
)
logger.error("UP stream run loop failed: \(error) \(connection.id) \(stream.id)")

Check warning on line 355 in Networking/Sources/Networking/Connection.swift

View check run for this annotation

Codecov / codecov/patch

Networking/Sources/Networking/Connection.swift#L355

Added line #L355 was not covered by tests
stream.close(abort: true)
}

Expand Down

0 comments on commit c10f836

Please sign in to comment.