db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1000808 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/store/replication/net/ReplicationMessageTransmit.java
Date Fri, 24 Sep 2010 11:18:39 GMT
Author: kahatlen
Date: Fri Sep 24 11:18:38 2010
New Revision: 1000808

URL: http://svn.apache.org/viewvc?rev=1000808&view=rev
Log:
DERBY-4819: Narrow scope of msgReceiver in ReplicationMessageTransmit

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/store/replication/net/ReplicationMessageTransmit.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/replication/net/ReplicationMessageTransmit.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/store/replication/net/ReplicationMessageTransmit.java?rev=1000808&r1=1000807&r2=1000808&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/store/replication/net/ReplicationMessageTransmit.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/store/replication/net/ReplicationMessageTransmit.java
Fri Sep 24 11:18:38 2010
@@ -45,9 +45,6 @@ public class ReplicationMessageTransmit 
      */
     private final int DEFAULT_MESSAGE_RESPONSE_TIMEOUT = 30000;
 
-    /** The thread that listens for messages from the slave */
-    private Thread msgReceiver = null;
-
     /** Used to synchronize when waiting for a response message from the slave
      */
     private final Object receiveSemaphore = new Object();
@@ -160,7 +157,6 @@ public class ReplicationMessageTransmit 
      */
     public void tearDown() throws IOException {
         stopMessageReceiver = true;
-        msgReceiver = null;
         if(socketConn != null) {
             socketConn.tearDown();
             socketConn = null;
@@ -309,7 +305,7 @@ public class ReplicationMessageTransmit 
     }
 
     private void startMessageReceiverThread(String dbname) {
-        msgReceiver = new MasterReceiverThread(dbname);
+        MasterReceiverThread msgReceiver = new MasterReceiverThread(dbname);
         msgReceiver.setDaemon(true);
         msgReceiver.start();
     }
@@ -364,7 +360,6 @@ public class ReplicationMessageTransmit 
                     // If we get an exception for this socket, the log shipper
                     // will clean up. Stop this thread.
                     stopMessageReceiver = true;
-                    msgReceiver = null;
                 }
             }
         }



Mime
View raw message