Index: wp-includes/comment.php
===================================================================
--- wp-includes/comment.php	(revision 11300)
+++ wp-includes/comment.php	(working copy)
@@ -1381,13 +1381,55 @@
  */
 function generic_ping($post_id = 0) {
 	$services = get_option('ping_sites');
+	$update_services = false;
+	
+	$errors = get_transient('ping_errors');
+	$update_errors = false;
+	
+	if ( false === $errors ) {
+		$update_errors = true;
+		$errors = array();
+	}
 
 	$services = explode("\n", $services);
-	foreach ( (array) $services as $service ) {
+	foreach ( (array) $services as $i => $service ) {
 		$service = trim($service);
-		if ( '' != $service )
-			weblog_ping($service);
+		if ( '' != $service ) {
+			if ( !isset($errors[$service]) )
+				$errors[$service] = array('count' => 0, 'time' => 0);
+			$success = weblog_ping($service);
+			if ( !$success ) {
+				if ( time() - $errors[$service]['time'] > 86400 ) { // count failures once per day at most
+					$update_errors = true;
+					$errors[$service]['time'] = time();
+					$errors[$service]['count']++;
+					// Pings have consistently failed for 14 seperate days
+					if ( $errors[$services]['count'] > 14 ) {
+						$update_services = true;
+						unset($services[$i]);
+					}
+				}
+			} elseif ( $errors[$service]['count'] ) {
+				// reset counter
+				$update_errors = true;
+				$errors[$service]['time'] = time();
+				$errors[$service]['count'] = 0;
+			}
+		}
 	}
+	
+	if ( $update_services )
+		update_option('ping_sites', implode("\n", $services));
+	
+	if ( $udpate_errors ) {
+		// the user may remove services from the admin interface, so we filter out invalid ones here
+		foreach ( array_keys($errors) as $service ) {
+			if ( !in_array($service, $services) )
+				unset($errors[$service]);
+		}
+		
+		set_transient('ping_errors', $errors);
+	}
 
 	return $post_id;
 }
@@ -1531,6 +1573,7 @@
  *
  * @param string $server Host of blog to connect to.
  * @param string $path Path to send the ping.
+ * @return bool $success Whether the ping was successful
  */
 function weblog_ping($server = '', $path = '') {
 	global $wp_version;
@@ -1546,6 +1589,8 @@
 	$home = trailingslashit( get_option('home') );
 	if ( !$client->query('weblogUpdates.extendedPing', get_option('blogname'), $home, get_bloginfo('rss2_url') ) ) // then try a normal ping
 		$client->query('weblogUpdates.ping', get_option('blogname'), $home);
+	
+	return !$client->isError();
 }
 
 //

