Skip to content

Commit 97a8e96

Browse files
committed
review fixes
1 parent 044765e commit 97a8e96

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

Sources/AsyncHTTPClient/HTTPHandler.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -841,12 +841,12 @@ extension TaskHandler: ChannelDuplexHandler {
841841
let promise = self.task.eventLoop.makePromise(of: Void.self)
842842
// All writes have to be switched to the channel EL if channel and task ELs differ
843843
if context.eventLoop.inEventLoop {
844-
context.writeAndFlush(self.wrapOutboundOut(.body(part)), promise: promise)
845844
self.actualBodyLength += part.readableBytes
845+
context.writeAndFlush(self.wrapOutboundOut(.body(part)), promise: promise)
846846
} else {
847847
context.eventLoop.execute {
848-
context.writeAndFlush(self.wrapOutboundOut(.body(part)), promise: promise)
849848
self.actualBodyLength += part.readableBytes
849+
context.writeAndFlush(self.wrapOutboundOut(.body(part)), promise: promise)
850850
}
851851
}
852852

Tests/AsyncHTTPClientTests/HTTPClientTestUtils.swift

-3
Original file line numberDiff line numberDiff line change
@@ -361,9 +361,6 @@ internal struct HTTPResponseBuilder {
361361
}
362362
}
363363

364-
// let globalRequestCounter = NIOAtomic<Int>.makeAtomic(value: 0)
365-
// let globalConnectionCounter = NIOAtomic<Int>.makeAtomic(value: 0)
366-
367364
internal struct RequestInfo: Codable {
368365
var data: String
369366
var requestNumber: Int

0 commit comments

Comments
 (0)