Client always disconnect then reconnected
Actualy I this library has successful to send message and receive message. but there is one problem which is client is always disconnected and then reconnected itself for around 3 seconds. I have follow the example in this repo correctly but not solved.
I have developed socket io client for web version, and there is no issue in web version. socket is stable connected. web version is using transport polling.
My question is, how to know why android socket io client is always disconnected for around 3 seconds? I can't fixed this because there is no error log in client also on server. I just know the log client is connected then disconnected from server.
Expected behavior Once client connected, this connection should stable until client disconnect by user activity.
Device details:
- Device Type: Device
- Model: Samsung M20
- OS: Android Pie
- Package Version: 28
Relevant Logs
No error log from client also server. there is only log for client is connected then disconnected only.
Hi @aalfiann ,
This issue is fixed in the below pull request, it will be merged to this library soon, meanwhile please use the fixed repository.
In your pubspec.yaml
adhara_socket_io:
git:
url: https://github.com/aslamanver/flutter_socket_io
@tiholic Fixed pull request: https://github.com/infitio/flutter_socket_io/pull/96
Hi @aalfiann ,
This issue is fixed in the below pull request, it will be merged to this library soon, meanwhile please use the fixed repository.
In your
pubspec.yamladhara_socket_io: git: url: https://github.com/aslamanver/flutter_socket_io@tiholic Fixed pull request: #96
the issue still happens on iOS. I call manager to disconnect the user of my socket-io server and calling Navigator.pop to destroy the page but after few seconds this reconnect again even if the Page is not more visible.
Hi @aalfiann ,
In iOS please try to downgrade the socket library and check it.