                                     deviceToken: connection.token,
                                     serviceStatus: .success)
         }
-        
-        // Do some cleanup
-        curl_easy_cleanup(connection.handle)
-        //            curl_slist_free_all(curlHeaders!)
         
         connection.completionHandler(result)
     }

    private class Connection: Equatable, Hashable {
        private(set) var data: Data = Data()
        let handle: UnsafeMutableRawPointer
        let messageId: String
        let token: String
        let completionHandler: (Result) -> Void

            
            curlHeaders = curl_slist_append(curlHeaders, "Authorization: bearer \(token)")
        }
        curlHeaders = curl_slist_append(curlHeaders, "User-Agent: VaporAPNS")
        for header in headers {
            curlHeaders = curl_slist_append(curlHeaders, "\(header.key): \(header.value)")
        }
