Skip to content
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

Connection failed to reconnect despite start transport was successful #302

Open
aliaksandrvarabyou opened this issue May 17, 2019 · 2 comments

Comments

@aliaksandrvarabyou
Copy link

Hi,
in our system we have issue with reconnect - in some cases whole request string length could be greater than allowed at server (2048 now) and 400 error appears. So we've decided to avoid reconnect at all and always use connect request. To achieve this we call 'stop' for connection when him state changed to 'reconnecting', and after 1 second call 'start''. All seems work fine but disconnectTimeoutOperation not cancelled after connection started and reconnect timeout triggered. This happens because in webSocketDidOpen of SRWebSocketTransport transfer to the 'connected' state is possible only if current state is 'reconnecting' , but we have 'connecting' after stop/start.
We've fix this with manual call of 'didReconnect' after connection state did change to 'connected', but it looks like dirty hack. Can you please advise something?
Many thanks.

@joeldart
Copy link
Member

this sounds vaguely familiar and possibly handled in some work done on an internal branch - feature-closeOnTimeout
We've been pointing our internal spec on

s.source   	 = { :git => 'https://github.com/DyKnow/SignalR-ObjC.git', :commit => '6550e5e205443b9356f6ae809df3b6eb6c79a798' }

for about 7 months now based on some fixes we identified (but hadnt yet published as a new version). that state transition sounds familiar enough you might try if it was fixed there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@joeldart @aliaksandrvarabyou and others