apache/cassandra — pull request #12 by canadianveggie (2012-08-01 23:58:12+00:00)
Title: Fix logic for logging a timeout error when MessagingService is draining

Fix logic for logging an error if streams don't terminate in 24 hours. Before the logic was backwards. When you called drain, it would log a bunch of incorrect error messages: "Stream took more than 24H to complete; skipping".

ThreadPoolExecutor.awaitTermination returns true if the executor terminates and false if the timeout elapses before termination.

http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadPoolExecutor.html#awaitTermination%28long,%20java.util.concurrent.TimeUnit%29