Added a destructor to kill open connections.

This commit is contained in:
Matt Butcher
2012-05-11 11:43:58 -05:00
parent e8bd19b035
commit 2152e0a7f1

View File

@@ -65,6 +65,13 @@ class CURLTransport implements Transporter {
*/
protected $multi = NULL;
public function __destruct() {
// Destroy the multi handle.
if (!empty($this->multi)) {
curl_multi_close($this->multi);
}
}
/*
public function curl($uri) {
//if (empty($this->curlInst)) {