diff --git a/lib/XmppPrebind.php b/lib/XmppPrebind.php index d1fd8a2..1df19ed 100644 --- a/lib/XmppPrebind.php +++ b/lib/XmppPrebind.php @@ -453,6 +453,11 @@ protected function send($xml) { $response = curl_exec($ch); + // Check if curl failed to get response + if ($response === false) { + throw new XmppPrebindConnectionException("Cannot connect to service"); + } + curl_close($ch); if ($this->useGzip) {