Skip to content

Stop reconnection #474

Open
Open
@arpitjoshi08

Description

@arpitjoshi08

i am implementing chat app using this socket io. its working fine now i am getting one issue is that socket reconnecting again and again if socket connection off, i like this its handing own no need to handle manually. but in second scenario, when i switched off network or data connection of mobile then i used this code for socket off
public static void stopConnection() { try { if (mSocket != null) { mSocket.disconnect(); mSocket.close(); } } catch (Exception e) { e.printStackTrace(); } }

but its not working. socket making connection again and again and getting Error when network connection switched off. how can we handle this situation?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions