--- aggregator2.module.orig	2006-07-17 10:09:25.000000000 -0700
+++ aggregator2.module	2006-07-17 10:06:35.000000000 -0700
@@ -1262,6 +1262,12 @@
   $data = curl_exec($ch);
   $info = curl_getinfo($ch);
 
+  if(curl_errno($ch)) {
+    watchdog('aggregator2', t('Error fetching feed at %url: %error.', array('%url' => '<em>'. $url .'</em>', '%error' => curl_error($ch))), WATCHDOG_ERROR, l(t('view'), 'node/'.$feed->nid));
+    drupal_set_message(t('Error fetching feed at %url: %error.', array('%url' => '<em>'. $url .'</em>', '%error' => curl_error($ch))), 'error');
+    return null;
+  }
+
   curl_close($ch);
   unset($ch);
 
@@ -1270,6 +1276,7 @@
   $result->headers = $response[1];
   $result->data = $response[2];
   $error = $response[3];
+
   switch ($code) {
     case 200: // OK
     case 304: // Not modified
@@ -1311,6 +1318,8 @@
 
   // Request feed.
   $result = aggregator2_http_request($feed->url, $headers, 15);
+  if(!$result)
+    return;
 
   // Update checked time, so it won't be checked each cron run, and thus block other feeds (outside of limit count) to be checked
   db_query('UPDATE {aggregator2_feed} SET checked = %d WHERE nid = %d', time(), $feed->nid);
