Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 739604 Details for
Bug 908224
reconnect_timeout ignored in qpid.messaging.Connection()
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh92 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Updated patch for reconnect and reconnect_timeout
bz908224.patch (text/plain), 1.81 KB, created by
Ernie
on 2013-04-24 21:11:29 UTC
(
hide
)
Description:
Updated patch for reconnect and reconnect_timeout
Filename:
MIME Type:
Creator:
Ernie
Created:
2013-04-24 21:11:29 UTC
Size:
1.81 KB
patch
obsolete
>Index: python/qpid/messaging/endpoints.py >=================================================================== >--- python/qpid/messaging/endpoints.py (revision 1469528) >+++ python/qpid/messaging/endpoints.py (working copy) >@@ -258,7 +264,10 @@ > if self._open: > raise ConnectionError("already open") > self._open = True >- self.attach() >+ timeout = None >+ if self.reconnect and self.reconnect_timeout > 0: >+ timeout = self.reconnect_timeout >+ self.attach(timeout=timeout) > > @synchronized > def opened(self): >@@ -268,7 +277,7 @@ > return self._open > > @synchronized >- def attach(self): >+ def attach(self, timeout=None): > """ > Attach to the remote endpoint. > """ >@@ -276,7 +285,9 @@ > self._connected = True > self._driver.start() > self._wakeup() >- self._ewait(lambda: self._transport_connected and not self._unlinked()) >+ if not self._ewait(lambda: self._transport_connected and not self._unlinked(), timeout=timeout): >+ self.reconnect = False >+ raise Timeout("Connection attach timed out") > > def _unlinked(self): > return [l >Index: python/qpid/tests/messaging/endpoints.py >=================================================================== >--- python/qpid/tests/messaging/endpoints.py (revision 1471401) >+++ python/qpid/tests/messaging/endpoints.py (working copy) >@@ -351,6 +351,16 @@ > def testConnectionClose(self): > self.timeoutTest(self.conn.close) > >+ def testConnectionOpen(self): >+ options = self.connection_options() >+ options["reconnect"] = True >+ options["reconnect_timeout"] = self.delay() >+ try: >+ bad_conn = Connection.establish("badhostname", **options) >+ assert False, "did not time out" >+ except Timeout: >+ pass >+ > ACK_QC = 'test-ack-queue; {create: always}' > ACK_QD = 'test-ack-queue; {delete: always}' >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 908224
:
706773
| 739604