Skip to content

Android Client Produces java.io.EOFException #1

@xlui

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

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