on capacitorjs sometimes cause delay of 4-5 sec #4883
Unanswered
mehimanshupatil
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have integrated socket.io-client with CapacitorJS, and it works fine in the browser. However, when running on Android, I've noticed that sometimes it takes 4-5 seconds to emit the connect callback.
Upon investigation, I found that socket.io typically initiates a long polling process and then upgrades to a socket connection. However, in some instances on the Android app, it doesn't make a long polling call and directly switches to a socket connection.
In usual cases, after probe2 (ping) and probe3 (pong) socket calls, it makes a 5 (upgrade) call.
But in cases where the long polling call is skipped, it takes 3-4 seconds to make the 5 (upgrade) call.
har file logs.zip
Beta Was this translation helpful? Give feedback.
All reactions