         final class ResponseDelegate: HTTPClientResponseDelegate {
             typealias Response = Void
 
-            private let bytesTheClientSent: NIOAtomic<Int>
-
-            init(bytesTheClientSent: NIOAtomic<Int>) {
+            private let bytesTheClientSent: ManagedAtomic<Int>
+
+            init(bytesTheClientSent: ManagedAtomic<Int>) {
                 self.bytesTheClientSent = bytesTheClientSent
             }
 

import NIOConcurrencyHelpers
import NIOHTTP1
import NIOSSL

final class ServerTests: XCTestCase {
    func testPortOverride() throws {

        app.http.server.configuration.port = 0
        defer { app.shutdown() }

        let numberOfTimesTheServerGotOfferedBytes = ManagedAtomic<Int>(0)
        let bytesTheServerSaw = ManagedAtomic<Int>(0)
        let bytesTheClientSent = ManagedAtomic<Int>(0)
        let serverSawEnd = ManagedAtomic<Bool>(false)
        let serverSawRequest = ManagedAtomic<Bool>(false)
        let allDonePromise = app.eventLoopGroup.any().makePromise(of: Void.self)

        app.on(.POST, "hello", body: .stream) { req -> Response in
            XCTAssertTrue(serverSawRequest.compareExchange(expected: false, desired: true, ordering: .relaxed).exchanged)

            return Response(body: .init(stream: { writer in
                req.body.drain { stream in
                    switch stream {
                    case .buffer(let bytes):
                        numberOfTimesTheServerGotOfferedBytes.wrappingIncrement(ordering: .relaxed)
                        bytesTheServerSaw.wrappingIncrement(by: bytes.readableBytes, ordering: .relaxed)
                    case .end:
                        XCTFail("backpressure should prevent us seeing the end of the request.")
                        serverSawEnd.store(true, ordering: .relaxed)
                        writer.write(.end, promise: nil)
                    case .error(let error):
                        writer.write(.error(error), promise: nil)
