Author: justi9
Date: 2008-05-13 18:44:04 -0400 (Tue, 13 May 2008)
New Revision: 2046
Modified:
mgmt/cumin/python/cumin/__init__.py
mgmt/mint/python/mint/__init__.py
Log:
bz438219 - Attempt reconnect if a broker conection closes
Modified: mgmt/cumin/python/cumin/__init__.py
===================================================================
--- mgmt/cumin/python/cumin/__init__.py 2008-05-13 21:54:11 UTC (rev 2045)
+++ mgmt/cumin/python/cumin/__init__.py 2008-05-13 22:44:04 UTC (rev 2046)
@@ -32,6 +32,11 @@
self.model = CuminModel(self, data_uri, spec_path)
self.broker_connect_thread = BrokerConnectThread(self.model)
+ def closeListener(*args):
+ self.broker_connect_thread.prompt()
+
+ self.model.data.setCloseListener(closeListener)
+
self.main_page = CuminPage(self, "index.html")
self.add_page(self.main_page)
self.set_default_page(self.main_page)
Modified: mgmt/mint/python/mint/__init__.py
===================================================================
--- mgmt/mint/python/mint/__init__.py 2008-05-13 21:54:11 UTC (rev 2045)
+++ mgmt/mint/python/mint/__init__.py 2008-05-13 22:44:04 UTC (rev 2046)
@@ -445,9 +445,7 @@
def closeCallback(self, brokerId, data):
self.log("\nCLOSE---------------------------------------------------")
self.log("BrokerId=%s , Data=%s" % (brokerId, data))
- conn = self.connections[brokerId]
- if (conn and conn.isOpen()):
- conn.close()
+ del self.connections[brokerId]
if (self.connCloseListener != None):
self.connCloseListener(brokerId, data)
self.log("END CLOSE---------------------------------------------------\n")
Show replies by date