infinispan/infinispan — pull request #2258 by danberindei (2013-12-04 12:28:20+00:00)
Title: ISPN-3773 State transfer thread can stop even though there are pending transfer tasks

https://issues.jboss.org/browse/ISPN-3773

Put the empty queue check and the thread stop in a synchronized block.
Simplify the state transfer loop by retrying failed tasks immediately.

No test for this, I think it would depend too much on the actual implementation.