qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kgiu...@apache.org
Subject svn commit: r1408888 - /qpid/proton/trunk/proton-c/examples/mailbox/server
Date Tue, 13 Nov 2012 18:51:50 GMT
Author: kgiusti
Date: Tue Nov 13 18:51:49 2012
New Revision: 1408888

URL: http://svn.apache.org/viewvc?rev=1408888&view=rev
Log:
PROTON-74: avoid processing closed connectors

Modified:
    qpid/proton/trunk/proton-c/examples/mailbox/server

Modified: qpid/proton/trunk/proton-c/examples/mailbox/server
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/examples/mailbox/server?rev=1408888&r1=1408887&r2=1408888&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/examples/mailbox/server (original)
+++ qpid/proton/trunk/proton-c/examples/mailbox/server Tue Nov 13 18:51:49 2012
@@ -169,27 +169,28 @@ class MailboxServer(object):
         while cxtr:
             self.log("Process Connector")
 
-            # process any data coming from the network, this will update the
-            # engine's view of the state of the remote clients
-            pn_connector_process(cxtr)
-
-            state = pn_connector_context(cxtr)
-            if state == AUTHENTICATING:
-                # connection has not passed SASL authentication yet
-                self.authenticateConnector(cxtr)
-            elif state == CONNECTION_UP:
-                # active connection, service any engine events
-                self.serviceConnector(cxtr)
-            else:
-                print("Error: Unknown Connection state=%s" % state)
-
-            # now generate any outbound network data generated in reponse to
-            # any work done by the engine.
-            pn_connector_process(cxtr)
-
+            # weed out any connector that has been closed
             if pn_connector_closed(cxtr):
                 self.log("Closing connector")
                 pn_connector_free(cxtr)
+            else:
+                # process any data coming from the network, this will update the
+                # engine's view of the state of the remote clients
+                pn_connector_process(cxtr)
+
+                state = pn_connector_context(cxtr)
+                if state == AUTHENTICATING:
+                    # connection has not passed SASL authentication yet
+                    self.authenticateConnector(cxtr)
+                elif state == CONNECTION_UP:
+                    # active connection, service any engine events
+                    self.serviceConnector(cxtr)
+                else:
+                    print("Error: Unknown Connection state=%s" % state)
+
+                # now generate any outbound network data generated in reponse to
+                # any work done by the engine.
+                pn_connector_process(cxtr)
 
             cxtr = pn_driver_connector(self.driver)
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message