     }
     
     // MARK: CURL Config
-    
-    private func createCurlMultiHandle() -> UnsafeMutableRawPointer {
-        let curlHandle = curl_multi_init()
-        // Apples APNS server don't support pipelining yet.
-        // curlHelperSetMultiOpt(curlHandle, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX)
-        return curlHandle!
-    }
     
     private func configureCurlHandle(for message: ApplePushMessage,
                                      to deviceToken: String,

                } else {
                    self.performActiveConnections()
                }
            } else {
                curl_multi_cleanup(self.curlHandle)
                self.curlHandle = self.createCurlMultiHandle()
            }
        }
    }
    
    

        
        var hashValue: Int { return messageId.hashValue }
        
        static func == (lhs: Connection, rhs: Connection) -> Bool {
            return lhs.messageId == rhs.messageId && lhs.token == rhs.token
        }
    }
    
    private var connections: Set<Connection> = Set()
    
    private func complete(connection: Connection) {
        connectionQueue.async {
            guard self.connections.contains(connection) else { return }
            self.connections.remove(connection)
            self.performQueue.async {
                print(">>> END \(connection.messageId) for \(connection.token)")
                curl_multi_remove_handle(self.curlHandle, connection.handle)
                self.handleCompleted(connection: connection)
            }
        }
    }
    
