-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
sockets: Remove redundant defering in _setup_sockjs_callbacks
.
#9752
sockets: Remove redundant defering in _setup_sockjs_callbacks
.
#9752
Conversation
This deferment is redundant because we are already waiting for document ready in transmit.js where we initialize this Socket object.
This makes sure that CSRF token is available while initializing Socket, irrespective of the order of execution of deferred callbacks after document becomes ready.
This seems reasonable to me, but I think it would be helpful here if you added a bunch of console statements for the various steps here, and then copy/paste the output into here. We'd want to see something like this:
|
@showell Here are logs:
and here is the git diff
|
@timabbott This LGTM. The code changes here are minimal and clean up the ugly $() wrapper that was in the middle of another function. And the console statements above seem to indicate that the order of operations is correct. It definitely deserves a second opinion, though, so I'm holding off on merging. |
Looks great, merged, thanks @shubhamdhama! |
Implementation of what said in #9416 (comment)
@showell let me know if this is the right fix for socket part of #9416