0

My App uses socket.io package + laravel-echo package, and when it connects, it makes two requests like this screenshot.

enter image description here

One request without sid parameter is fine, and my app can work normally.

enter image description here

However, the one with sid parameter request keeps failing, I don't know why.

enter image description here

And that request will retry, and still failing like this.

enter image description here

Sometimes the request with sid param will work, and no matter its success or failure, my app will work normally.

Why is this happening?

Joseph
  • 3,974
  • 7
  • 34
  • 67
  • Any chance you are using socket.io? Plain Websockets do not use/need this kind of parameters. Perhaps "laravel-echo" has the same functionality and this is some kind of meta information. – Marc Apr 21 '21 at 08:35
  • Yes, I'm using socket.io – Joseph Apr 21 '21 at 08:36
  • 1
    socket.io is not the same as plain WebSockets. It use only WebSockets as transport and implement its own protocol on top of WebSockets: Its very well documented! https://socket.io/docs/v4#What-Socket-IO-is-not – Marc Apr 21 '21 at 08:38
  • Thank you. I thought they were kind the same. – Joseph Apr 21 '21 at 08:42

0 Answers0