Skip to content

Android Client Produces java.io.EOFException #1

Description

@xlui

Using okhttp WebSocket as a stomp client will throws an error after about 1 min of inactivity.

java.lang.Exception: java.io.EOFException

This is because that StompProtocolAndroid have not implement heart beat on creating connections, so we have to implement it by ourselves.

Here is an example:

// code to set a scheduled task, I'm sorry for ignoring this part, but I don't know how to do this.
stompClient.send("", "")subscribe();   // send a heart beat

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions