You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@excalibur.apache.org by le...@apache.org on 2004/07/28 11:57:48 UTC

svn commit: rev 30837 - excalibur/trunk/containerkit/instrument/client/src/java/org/apache/excalibur/instrument/client/http

Author: leif
Date: Wed Jul 28 02:57:47 2004
New Revision: 30837

Modified:
   excalibur/trunk/containerkit/instrument/client/src/java/org/apache/excalibur/instrument/client/http/HTTPInstrumentManagerConnection.java
Log:
Fix a problem where I was firing off a connected event before a new connection to the server had actually been verified.

Modified: excalibur/trunk/containerkit/instrument/client/src/java/org/apache/excalibur/instrument/client/http/HTTPInstrumentManagerConnection.java
==============================================================================
--- excalibur/trunk/containerkit/instrument/client/src/java/org/apache/excalibur/instrument/client/http/HTTPInstrumentManagerConnection.java	(original)
+++ excalibur/trunk/containerkit/instrument/client/src/java/org/apache/excalibur/instrument/client/http/HTTPInstrumentManagerConnection.java	Wed Jul 28 02:57:47 2004
@@ -244,20 +244,20 @@
         {
             HttpURLConnection conn = (HttpURLConnection)url.openConnection();
             
-            boolean oldConnected = m_connected;
-            m_connected = true;
-            if ( !oldConnected )
+            if ( conn.getResponseCode() == conn.HTTP_OK )
             {
-                // Notify the listeners.
-                InstrumentManagerConnectionListener[] listenerArray = getListenerArray();
-                for ( int i = 0; i < listenerArray.length; i++ )
+                boolean oldConnected = m_connected;
+                m_connected = true;
+                if ( !oldConnected )
                 {
-                    listenerArray[i].opened( this );
+                    // Notify the listeners.
+                    InstrumentManagerConnectionListener[] listenerArray = getListenerArray();
+                    for ( int i = 0; i < listenerArray.length; i++ )
+                    {
+                        listenerArray[i].opened( this );
+                    }
                 }
-            }
-            
-            if ( conn.getResponseCode() == conn.HTTP_OK )
-            {
+                
                 InputStream is = conn.getInputStream();
                 try
                 {

---------------------------------------------------------------------
To unsubscribe, e-mail: scm-unsubscribe@excalibur.apache.org
For additional commands, e-mail: scm-help@excalibur.apache.org