     func didAcceptNewSocket(socket: ProxySocket) {
         let tunnel = Tunnel(proxySocket: socket)
         tunnel.delegate = self
-        tunnelPool.value.append(tunnel)
+        tunnels.value.append(tunnel)
         tunnel.openTunnel()
     }
 

     - parameter tunnel: The closed tunnel.
     */
    func tunnelDidClose(tunnel: Tunnel) {
        tunnelPool.withBox { tunnels in
            guard let index = tunnels.value.indexOf(tunnel) else {
                // things went strange
                DDLogError("Encountered an unknown tunnel.")
                return
            }
            tunnels.value.removeAtIndex(index)
            DDLogVerbose("Removed a closed tunnel, now there are \(tunnels.value.count) tunnels active.")
            //            DDLogDebug("Active Tunnel Info:")
            //            for tunnel in self.tunnels {
            //                DDLogDebug("Tunnel to \(tunnel.proxySocket.request?.host), proxy socket state: \(tunnel.proxySocket.state), adapter socket state: \(tunnel.adapterSocket?.state), closed: \(tunnel.closed).")
            //
        }
    }
}

    /// The address of proxy server.
    public let address: IPv4Address

    private var tunnels: TunnelArray = Atomic([])

    /**
     Create an instance of proxy server.
