Skip to content

Conversation

@sam-ma
Copy link

@sam-ma sam-ma commented Aug 24, 2016

Consider the case when TcpTransport.stop() is called just after a TcpTransport.start() call. There is a chance that the socketState becomes CANCELING which is changed by the TcpTransport.stop() call. The following logic would prevent it from connecting and doing any further initialization. In this scenario, the CANCELING.onCanceled() would never be triggered after that, which means the onCompleted Task of the TcpTransport.stop() parameter would never be triggered as well. As a result, the client will wait forever if it relies on the onCompleted Task to be called to proceed.

// No need to complete if we have been canceled.
if( ! socketState.is(CONNECTING.class) ) {
    return;
}

@sam-ma
Copy link
Author

sam-ma commented Aug 25, 2016

I believe AMQ-6405 will be fixed by this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant