SID in the connect endpoint and in the HTTP query params do not match #1493
Unanswered
guneemwelloeux
asked this question in
Q&A
Replies: 1 comment 2 replies
-
This is actually working as designed. For each Socket.IO client you will normally find at least 2 SIDs. The SID that you see in the connection URL in the logs is the Engine.IO SID. This is the low-level transport on which all the Socket.IO namespaces are multiplexed. Then the client connects to one or more Socket.IO namespaces, and each of these logical connections receives its own SID. These are the SIDs that you receive in your connection event handler. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've been investigating issues with my socket.io powered service for a while now, but only realised that the
sid=
part of the URL does not match what theconnect
event handler is reporting assid
(the first parameter).For example, with this connect event handler:
I'm seeing this in the logs:
This clearly shows that the SID that python-socketio "sees" is different from that which is returned to the client, which we can see in the next request on the third line above.
What gives? How can I explain that, and more importantly, how can I fix my code so that the same SID is displayed and I can link my logs together properly?
Beta Was this translation helpful? Give feedback.
All reactions