Status: Resolved (View Workflow)
Affects Version/s: None
Fix Version/s: 3.2.5.Final
When using Netty (3.2.3-Final) with the HornetQ (2.1.2) servlet transport, a failure to connect to the HornetQ server (e.g. when specifying an incorrect port) can cause HornetQ to hang on this line in the NettyConnector close() method:
It looks like the problem may be that HttpTunnelingClientSocketChannel writeLastChunk() (called by closeReal()), throws a NotYetConnectedException (because the connect failed and the request header did not get written).
The failure of the close neither gets back to the future returned by close, nor does close() throw an exception, so it hangs.
I could reproduce this with Netty 3.2.4-Final and HornetQ 2.2.2-Final.
The writeLastChunk() should return e.g. a failedFuture to notify its callers.
return Channels.failedFuture( this, new NotYetConnectedException() );