Closed danielcompton closed 8 years ago
Hey Daniel, just to clarify what I'll be looking for-
chsk-disconnect!
call.That correct? This part is tripping me up:
when I disconnect a websocket connection when it is trying to connect
Are you implying this only happens if you issue chsk-disconnect!
while a normal connection attempt is literally in progress? Should the above instead be adjusted to-
chsk-disconnect!
call.I've just pushed a branch
Great, that'll be helpful. Will just wait for you to confirm what I'm looking for.
Thanks, cheers :-)
Just to confirm, you're not seeing a log message like Permanently downgrading :auto chsk -> :ajax
?
I.e. no chance that what's happening is that the WebSocket->Ajax fallback is kicking in? (It shouldn't, but may be buggy).
Just to confirm, you're not seeing a log message like Permanently downgrading :auto chsk -> :ajax?
Nope, nothing about downgrading to ajax, and devtools shows a ws connection. The steps to reproduce are:
The steps to reproduce are
Thanks, this framing makes the problem immediately clear. The critical observation was 4 preceding 5. Will fix, thanks.
Just pushed [com.taoensso/sente "1.11.0-SNAPSHOT"]
to Clojars. When you have some time, may I ask you to confirm that this is resolved?
Would also be happy to accept a PR that brings the disconnect/reconnect buttons to the ref example.
Thanks
Sure thing, will look at both of your changes on Monday. Thanks!
I can confirm that your commit fixes this. Thanks!
I've noticed that when I disconnect a websocket connection when it is trying to connect, it makes one more reconnect attempt after the disconnect. I've attached a log below from the Sente example project showing this.
I've just pushed a branch https://github.com/ptaoussanis/sente/tree/reconnect-example which adds a disconnect and reconnect button in the example project for you to easily experiment with.
I've had a look at the reconnect code, and I can't quite figure out where the checks should go to stop this from happening.