I am using android-websockets library from codebutler in my project. But I ran into problem when I execute disconnect()
method. Following is the code:
It is because the implementation of disconnect() method does not synchronize with the thread which is created in the implementation of connect() method. codebutler/android-websockets is not of commercial quality. The disconnect() method does not perform even the closing handshake which is required by RFC 6455.
Use another WebSocket library if you don't want to see the error.