Skip to content

Commit

Permalink
catching the death of a receiver thread, closing the connection
Browse files Browse the repository at this point in the history
  • Loading branch information
belaban committed Jul 1, 2011
1 parent 679d23b commit 52f0c1d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/org/jgroups/blocks/BasicConnectionTable.java
Expand Up @@ -647,6 +647,16 @@ String printCookie(byte[] c) {


public void run() {
try {
_run();
}
finally {
receiverThread=null;
closeSocket();
}
}

protected void _run() {
while(receiverThread != null && receiverThread.equals(Thread.currentThread()) && is_running) {
try {
if(in == null) {
Expand Down Expand Up @@ -675,8 +685,8 @@ public void run() {
}
if(log.isTraceEnabled())
log.trace("ConnectionTable.Connection.Receiver terminated");
receiverThread=null;
closeSocket();
// receiverThread=null;
// closeSocket();
// remove(peer_addr);
}

Expand Down

0 comments on commit 52f0c1d

Please sign in to comment.