@@ -342,15 +342,14 @@ internal final class HTTPBin<RequestHandler: ChannelInboundHandler> where
342
342
socketAddress = try ! SocketAddress ( unixDomainSocketPath: path)
343
343
}
344
344
345
- let activeConnCounterHandler = CountActiveConnectionsHandler ( )
346
- self . activeConnCounterHandler = activeConnCounterHandler
345
+ self . activeConnCounterHandler = CountActiveConnectionsHandler ( )
347
346
348
347
let connectionIDAtomic = NIOAtomic< Int> . makeAtomic( value: 0 )
349
348
350
349
self . serverChannel = try ! ServerBootstrap ( group: self . group)
351
350
. serverChannelOption ( ChannelOptions . socket ( SocketOptionLevel ( SOL_SOCKET) , SO_REUSEADDR) , value: 1 )
352
351
. serverChannelInitializer { channel in
353
- channel. pipeline. addHandler ( activeConnCounterHandler)
352
+ channel. pipeline. addHandler ( self . activeConnCounterHandler)
354
353
} . childChannelInitializer { channel in
355
354
do {
356
355
let connectionID = connectionIDAtomic. add ( 1 )
@@ -364,7 +363,7 @@ internal final class HTTPBin<RequestHandler: ChannelInboundHandler> where
364
363
try self . syncAddHTTPProxyHandlers (
365
364
to: channel,
366
365
connectionID: connectionID,
367
- expectedAuthroization : expectedAuthorization
366
+ expectedAuthorization : expectedAuthorization
368
367
)
369
368
return channel. eventLoop. makeSucceededVoidFuture ( )
370
369
}
@@ -392,14 +391,14 @@ internal final class HTTPBin<RequestHandler: ChannelInboundHandler> where
392
391
private func syncAddHTTPProxyHandlers(
393
392
to channel: Channel ,
394
393
connectionID: Int ,
395
- expectedAuthroization : String ?
394
+ expectedAuthorization : String ?
396
395
) throws {
397
396
let sync = channel. pipeline. syncOperations
398
397
let promise = channel. eventLoop. makePromise ( of: Void . self)
399
398
400
399
let responseEncoder = HTTPResponseEncoder ( )
401
400
let requestDecoder = ByteToMessageHandler ( HTTPRequestDecoder ( leftOverBytesStrategy: . forwardBytes) )
402
- let proxySimulator = HTTPProxySimulator ( promise: promise, expectedAuhorization: expectedAuthroization )
401
+ let proxySimulator = HTTPProxySimulator ( promise: promise, expectedAuhorization: expectedAuthorization )
403
402
404
403
try sync. addHandler ( responseEncoder)
405
404
try sync. addHandler ( requestDecoder)
0 commit comments