Skip to content

Commit 4a5cc57

Browse files
committed
Merge branch 'master' into fix_handler_error_after_error
2 parents 4d08c50 + 1432843 commit 4a5cc57

File tree

5 files changed

+5
-3
lines changed

5 files changed

+5
-3
lines changed

Sources/AsyncHTTPClient/HTTPHandler.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ extension HTTPClient {
562562
var connection: Connection?
563563
var cancelled: Bool
564564
let lock: Lock
565-
let logger: Logger // We are okay to store the logger here because a Task is for only ond request.
565+
let logger: Logger // We are okay to store the logger here because a Task is for only one request.
566566

567567
init(eventLoop: EventLoop, logger: Logger) {
568568
self.eventLoop = eventLoop

Tests/AsyncHTTPClientTests/HTTPClientInternalTests+XCTest.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ extension HTTPClientInternalTests {
4646
("testConnectErrorCalloutOnCorrectEL", testConnectErrorCalloutOnCorrectEL),
4747
("testInternalRequestURI", testInternalRequestURI),
4848
("testBodyPartStreamStateChangedBeforeNotification", testBodyPartStreamStateChangedBeforeNotification),
49+
("testHandlerDoubleError", testHandlerDoubleError),
4950
]
5051
}
5152
}

Tests/AsyncHTTPClientTests/HTTPClientInternalTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1091,7 +1091,7 @@ class HTTPClientInternalTests: XCTestCase {
10911091
self.count += 1
10921092
}
10931093

1094-
func didFinishRequest(task: HTTPClient.Task<Void>) throws -> Void {
1094+
func didFinishRequest(task: HTTPClient.Task<Void>) throws {
10951095
return ()
10961096
}
10971097
}

Tests/AsyncHTTPClientTests/HTTPClientTests+XCTest.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ extension HTTPClientTests {
122122
("testContentLengthTooShortFails", testContentLengthTooShortFails),
123123
("testBodyUploadAfterEndFails", testBodyUploadAfterEndFails),
124124
("testNoBytesSentOverBodyLimit", testNoBytesSentOverBodyLimit),
125+
("testDoubleError", testDoubleError),
125126
]
126127
}
127128
}

Tests/AsyncHTTPClientTests/HTTPClientTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2625,6 +2625,6 @@ class HTTPClientTests: XCTestCase {
26252625

26262626
// We specify a deadline of 2 ms co that request will be timed out before all chunks are writtent,
26272627
// we need to verify that second error on write after timeout does not lead to double-release.
2628-
XCTAssertThrowsError(try defaultClient.execute(request: request, deadline: .now() + .milliseconds(2)).wait())
2628+
XCTAssertThrowsError(try self.defaultClient.execute(request: request, deadline: .now() + .milliseconds(2)).wait())
26292629
}
26302630
}

0 commit comments

Comments
 (0)