Skip to content

Commit c4c7212

Browse files
committed
Code review
1 parent 8fbeb16 commit c4c7212

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

‎Tests/AsyncHTTPClientTests/HTTPClientTestUtils.swift‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -342,15 +342,14 @@ internal final class HTTPBin<RequestHandler: ChannelInboundHandler> where
342342
socketAddress =try!SocketAddress(unixDomainSocketPath: path)
343343
}
344344

345-
letactiveConnCounterHandler=CountActiveConnectionsHandler()
346-
self.activeConnCounterHandler = activeConnCounterHandler
345+
self.activeConnCounterHandler =CountActiveConnectionsHandler()
347346

348347
letconnectionIDAtomic= NIOAtomic<Int>.makeAtomic(value:0)
349348

350349
self.serverChannel =try!ServerBootstrap(group:self.group)
351350
.serverChannelOption(ChannelOptions.socket(SocketOptionLevel(SOL_SOCKET), SO_REUSEADDR), value:1)
352351
.serverChannelInitializer{ channel in
353-
channel.pipeline.addHandler(activeConnCounterHandler)
352+
channel.pipeline.addHandler(self.activeConnCounterHandler)
354353
}.childChannelInitializer{ channel in
355354
do{
356355
letconnectionID= connectionIDAtomic.add(1)
@@ -364,7 +363,7 @@ internal final class HTTPBin<RequestHandler: ChannelInboundHandler> where
364363
tryself.syncAddHTTPProxyHandlers(
365364
to: channel,
366365
connectionID: connectionID,
367-
expectedAuthroization: expectedAuthorization
366+
expectedAuthorization: expectedAuthorization
368367
)
369368
return channel.eventLoop.makeSucceededVoidFuture()
370369
}
@@ -392,14 +391,14 @@ internal final class HTTPBin<RequestHandler: ChannelInboundHandler> where
392391
privatefunc syncAddHTTPProxyHandlers(
393392
to channel:Channel,
394393
connectionID:Int,
395-
expectedAuthroization:String?
394+
expectedAuthorization:String?
396395
)throws{
397396
letsync= channel.pipeline.syncOperations
398397
letpromise= channel.eventLoop.makePromise(of:Void.self)
399398

400399
letresponseEncoder=HTTPResponseEncoder()
401400
letrequestDecoder=ByteToMessageHandler(HTTPRequestDecoder(leftOverBytesStrategy:.forwardBytes))
402-
letproxySimulator=HTTPProxySimulator(promise: promise, expectedAuhorization:expectedAuthroization)
401+
letproxySimulator=HTTPProxySimulator(promise: promise, expectedAuhorization:expectedAuthorization)
403402

404403
try sync.addHandler(responseEncoder)
405404
try sync.addHandler(requestDecoder)

0 commit comments

Comments
(0)