Skip to content

Commit efa86b5

Browse files
committed
Remove promise?.succeed(())
1 parent 3f8f55f commit efa86b5

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

Sources/AsyncHTTPClient/ConnectionPool/HTTP1/HTTP1ClientChannelHandler.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ final class HTTP1ClientChannelHandler: ChannelDuplexHandler {
157157
metadata: req.requestFramingMetadata
158158
)
159159
self.run(action, context: context)
160-
promise?.succeed(())
161160
}
162161

163162
func read(context: ChannelHandlerContext) {

Tests/AsyncHTTPClientTests/HTTP1ClientChannelHandlerTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ class HTTP1ClientChannelHandlerTests: XCTestCase {
554554
// non empty body is important to trigger this bug as we otherwise finish the request in a single flush
555555
request.requestFramingMetadata.body = .fixedSize(1)
556556
request.raiseErrorIfUnimplementedMethodIsCalled = false
557-
try channel.writeOutbound(request)
557+
channel.writeAndFlush(request, promise: nil)
558558
XCTAssertEqual(request.events.map(\.kind), [.willExecuteRequest, .requestHeadSent])
559559
}
560560
}

0 commit comments

Comments
 (0)