-
Notifications
You must be signed in to change notification settings - Fork 461
Updated Starscream to custom fork: fixes issue with remote peer closing connection #588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated Starscream to custom fork: fixes issue with remote peer closing connection #588
Conversation
…ote peer closing connection;
@yaroslavyaroslav Don't review/merge it! I've found out that I haven't uploaded all changes yet. What is left is the logic for auto-reconnect only in case when a connection is closed by a remote peer. It is done already, tested and working well for quite a while already. |
@yaroslavyaroslav False alarm. The auto-reconnect feature I've built is based on #446 from @odanylovych It's not complicated but based on |
@yaroslavyaroslav Btw, we can take only the CI part from this PR to introduce
|
@JeneaVranceanu i'd agree with adding DocC for that library, but it should be merged to Also GitHub pages are available only since Xcode 14, which is in beta yet. |
Speaking about Starscreem dependency. Aren't we were discuss migrate to some another Websocket library? @JeneaVranceanu @mloit I haven't worked with WebSocket closely, but roughly googling gave me this. What do you think, folks, does it worth it? |
We did talk about it, and I think it would be good if we could. Starscream is one of the major hurdles in being able to build the library on non-Apple platforms. Also as Jenea mentioned it seems to be no longer maintained, so we should move away from an aging library. We could go with either the native websocket API, or with the NIO implementation, though my preference is to avoid external dependencies. (Having said that I think NIO is fairly safe as it is maintained by Apple) |
@mloit oh, I've forgot about |
@JeneaVranceanu Starscream is dropped from dependencies list for 3.0.0 release same as Websocket feature, therefore this PR will be closed. |
Note: it includes CI updates to use macOS 12.
Here is the link to PR in Starscream library.
Here is also the link to the issue with all details and my findings.
I doubt that it will be merged anytime soon as there is no activity on the side of maintainers but the bug this PR fixes caused quite some problems some time ago.
I know there some work is happening on the network layer but I still think it will be a good bug fix as the issue we are having with the current version of Starscream is quite significant. The issue is that once the WebSocket connection is closed by the other end (by the server in our case), we will never know that it happened, so there is no way to reconnect back to the server.
I had this issue with the project I'm working on because backend developers are using a load balancer which drops WebSocket connections every 30 seconds.