Red Hat Bugzilla – Bug 471234
Client hangs if broker returns invalid URL in closeOk
Last modified: 2011-08-12 12:22:47 EDT
Description of problem:
Version-Release number of selected component (if applicable):
How reproducible: easy
Steps to Reproduce:
1. Hack the broker to return an invalid URL,e.g. comment out the body of SystemInfo::getLocalIpAddresses so it returns an empty list.
2. Run any client, e.g. client_test or perftest.
Client exits with appropriate exception message.
Looks like the exception is caught in ConnectionHandler::incoming and the state set to CLOSING, but the client thread is waiting for CLOSED and it seems that this transition never happens.
This is a result of the Connector being closed before the connection_close request is written to the wire, this means the broker never receives it and never responds with a close-ok which triggers the change tto the CLOSED state.
Fix is to record the error, let the close be sent and on receiving the clos-ok handle the error if set.
By-passing QE on this one as (a) its an obscure corner case in error handling and thus not a priority for verification and (b) testing it requires hacking the broker to send a bad url.
Fixed in r713739.