Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection timeout errors should result in a normal Exception with a stack trace #39

Open
morganmcc opened this issue May 29, 2018 · 0 comments

Comments

@morganmcc
Copy link

The FailedFuture implementation creates a failed future with a NoStackTraceThrowable error when created with a simple string message. This is the constructor that gets called by StompClientImpl:192 when there is a timeout waiting for a CONNECTED frame from the server. I think we need to create an actual failed future here with a logical Exception.

I ran into this because I was using the awaitResult construct in a Kotlin co-routine to make a call to connect to a Stomp server. The implementation of awaitResult looks for a failed future and then throws any error.

The consequences of this were that my code using awaitResult which was using a try/catch block with Exception failed to catch the error.

A connection error like this should result in a normal exception and not a Throwable. I changed things around to avoid using the awaitResult because of this.

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

No branches or pull requests

1 participant