Closed stairs closed 6 years ago
I'll create a PR with fast fix but I won't be able to test right now. @forresthopkinsa Please, take a look and test if you can.
Absolutely, I'll check it out when I get to work in about an hour.
You're totally right. With JWS, messages can still be sent after an Error event, whereas with OkHttp, a Failure is a combination of an Error and a Close. The code should definitely reflect that.
Thanks a lot for fixing this one! Unfortunately, I've found another issue after this one was fixed. I'll report it separately.
Hi, I faced the reconnect problem after n/w disconnet/connect in the upstream project. i put my issue there [ref: https://github.com/NaikSoftware/StompProtocolAndroid/issues/87] where i saw the same discussion and came to this downstream project. I tried with 17.11.0 version but still facing the same reconnect problem. Is it the proper version to be checked or I am missing something.
@souravbasu14 That fix wasn't included in the 17.11.0 release. It was released a day later, and it's scheduled to be included in 17.12.0. You can, however, use a non-release version, like so:
dependencies {
compile 'com.github.forresthopkinsa:StompProtocolAndroid:965f1275ad'
}
@forresthopkinsa I did a quick verification with the above version. Below are my steps and observations:
Also observed a crash which leads the app to crash. Attached is the crashlog which i received in crashlytics. crash.txt
OkHttp websocket ERROR event means that socket is closed and no further calls to listener will be made. However, next piece of code only notifies the client that connection is closed when CLOSE event is received.
As a result we get "Attempted to connect when already connected" when socket is actually closed.