Fix CPU high problem when the zipkin collector is down
diff --git a/htrace-zipkin/src/main/java/org/cloudera/htrace/impl/ZipkinSpanReceiver.java b/htrace-zipkin/src/main/java/org/cloudera/htrace/impl/ZipkinSpanReceiver.java
index 110ffbb..f92491b 100644
--- a/htrace-zipkin/src/main/java/org/cloudera/htrace/impl/ZipkinSpanReceiver.java
+++ b/htrace-zipkin/src/main/java/org/cloudera/htrace/impl/ZipkinSpanReceiver.java
@@ -278,7 +278,11 @@
           errorCount += 1;
           // If there have been ten errors in a row start dropping things.
           if (errorCount < MAX_ERRORS) {
-            dequeuedSpans.addAll(dequeuedSpans);
+            try {
+              queue.addAll(dequeuedSpans);
+            } catch (IllegalStateException ex) {
+              // Just drop them if queue is full.
+            }
           }
 
           closeClient();