Permalink
Browse files

ns

  • Loading branch information...
1 parent f85c002 commit 4eb70e44842bed962b57a8c160fc29735664e985 Bela Ban committed Jun 18, 2010
Showing with 6 additions and 7 deletions.
  1. +6 −7 src/org/jgroups/blocks/TCPConnectionMap.java
@@ -536,9 +536,13 @@ private boolean matchCookie(byte[] input) {
private class ConnectionPeerReceiver implements Runnable {
private Thread recv;
private final AtomicBoolean receiving = new AtomicBoolean(false);
+
+
public ConnectionPeerReceiver(ThreadFactory f) {
recv = f.newThread(this,"Connection.Receiver [" + getSockAddress() + "]");
}
+
+
public void start() {
if(receiving.compareAndSet(false, true)) {
recv.start();
@@ -615,7 +619,7 @@ public void run() {
data=send_queue.take();
}
catch(InterruptedException e) {
- Thread.currentThread().interrupt();
+ // Thread.currentThread().interrupt();
break;
}
@@ -664,12 +668,7 @@ public String toString() {
}
public boolean isExpired(long now) {
- if(getConnectionExpiryTimeout() > 0) {
- return now - last_access >= getConnectionExpiryTimeout();
- }
- else {
- return false;
- }
+ return getConnectionExpiryTimeout() > 0 && now - last_access >= getConnectionExpiryTimeout();
}
public boolean isOpen() {

0 comments on commit 4eb70e4

Please sign in to comment.