belaban/JGroups — pull request #87 by WIgor (2013-07-23 11:21:27+00:00)
Title: Don't block thread forever

Hi,

Probably i've found small issue.

We had problem in next case: two ore more clusters connected via RELAY2. And when connection was broken for some time and site went from state UNKNOWN to DOWN and after that connection restored and site went UP - messages didnt pass between clusters at all.

After some discovering of this problem I found that Relayer is blocking thread at putting message to blocking queue. And this thread will be blocked forever. Because it doesnt free this queue when site goes from state UNKNOWN to DOWN (method changeStatusToDown). Also this blocked thread is blocking of passing of any new messages through this relay - because on level NAKACK2 in method removeAndPassUp buf.getProcessing() was already setted up to true in blocked thread, and we hold this lock forever until relay goes down.