Author: phunt
Date: Fri Jun 27 17:13:26 2008
New Revision: 672435

URL: http://svn.apache.org/viewvc?rev=672435&view=rev
Log:
Addresses hudson build issue on solaris - see ZOOKEEPER-45 
fix_solaris_test.patch

Modified:
    hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ClientCnxn.java

Modified: 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ClientCnxn.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ClientCnxn.java?rev=672435&r1=672434&r2=672435&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ClientCnxn.java 
(original)
+++ hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ClientCnxn.java 
Fri Jun 27 17:13:26 2008
@@ -349,7 +349,7 @@
         if (p.watchRegistration != null) {
             p.watchRegistration.register(p.replyHeader.getErr());
         }
-        
+
         p.finished = true;
         if (p.cb == null) {
             synchronized (p) {
@@ -597,6 +597,7 @@
             synchronized (this) {
                 k.interestOps(SelectionKey.OP_READ | SelectionKey.OP_WRITE);
             }
+            zooKeeper.state = States.CONNECTED;
         }
 
         private void sendPing() {
@@ -697,7 +698,6 @@
                         SocketChannel sc = ((SocketChannel) k.channel());
                         if ((k.readyOps() & SelectionKey.OP_CONNECT) != 0) {
                             if (sc.finishConnect()) {
-                                zooKeeper.state = States.CONNECTED;
                                 lastHeard = now;
                                 lastSend = now;
                                 primeConnection(k);
@@ -809,10 +809,10 @@
     public ReplyHeader submitRequest(RequestHeader h, Record request,
             Record response,
             WatchRegistration watchRegistration)
-        throws InterruptedException 
+        throws InterruptedException
     {
         ReplyHeader r = new ReplyHeader();
-        Packet packet = 
+        Packet packet =
             queuePacket(h, r, request, response, null, null, null,
                     watchRegistration);
         synchronized (packet) {


Reply via email to