Skip to content

Ping timeout from server #107

Description

@kantorr

My Client is always disconnected from socketIO server after 60 seconds. It seems like my client is not pinging the server but I dont know why that is or where can I setup the pingInterval. Here are my Options for the socket:

 client = new OkHttpClient();
        options = new Options();
        // IO factory options
        options.forceNew = false;
        options.multiplex = true;
        // low-level engine options
        options.transports = new String[]{WebSocket.NAME};
        options.upgrade = false;
        options.rememberUpgrade = false;
        options.query = null;//.setQuery(null)
        options.extraHeaders = null;//.setExtraHeaders(null)
        // Manager options
        options.reconnection = true;//.setReconnection(true)
        options.reconnectionAttempts = 5;//.setReconnectionAttempts(Integer.MAX_VALUE)
        options.reconnectionDelay = 1000;//.setReconnectionDelay(1_000)
        options.reconnectionDelayMax = 5000;//.setReconnectionDelayMax(5_000)
        options.randomizationFactor = 0.5;//.setRandomizationFactor(0.5)
        options.timeout = -1;//30000;
        
        options.callFactory = client;
        options.webSocketFactory = client;

        options.port = port;
        options.path = path;

I presume I have to match the pingInterval with the SocketIO server but where do i set it up?

Java Client: egine.io-client-2.0.0.jar, socket.io-client-1.0.0.jar

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions