Rocket.Chat.js.SDK icon indicating copy to clipboard operation
Rocket.Chat.js.SDK copied to clipboard

Socket keeps closing on ios release build

Open uncledent opened this issue 5 years ago • 3 comments

On release build on iOS the socket stays active for like 45 seconds and then gets closed with 1001 error (reason: Stream end encountered). On Debug build everything is fine, connections stays open. Interestingly ping/pong does not stop....

Any idea? I spent a whole day on this and can't find out any reason for this....

Any help will be appreciated.

uncledent avatar Feb 28 '19 16:02 uncledent

So I found out, that this is an implementation problem. Pings are lost. Probably my PR has a fault on this. I will fix it and update the Pull Request.

uncledent avatar Mar 01 '19 10:03 uncledent

any update on this? socket connection to my meteor app(rocket chat) keep on getting lost /close after a particular time since from it found no change events (no new message) on listening event (streaming on message subscription)

aswanyaugustine avatar Mar 08 '19 04:03 aswanyaugustine

@iconist for me the problem was that the sdk.connect call was called twice with 20ms difference, which caused a double initialization of Socket. So it pinged a wrong one.

uncledent avatar Mar 11 '19 10:03 uncledent