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

Server lost the message which is sent in client reconnect event handler #2935

Closed
mingc00 opened this Issue May 10, 2017 · 4 comments

Comments

Projects
None yet
4 participants
@mingc00

mingc00 commented May 10, 2017

Note: for support questions, please use one of these channels: stackoverflow or slack

You want to:

  • report a bug
  • request a feature

Current behaviour

We register asynchronous middleware for authentication. After upgrading socket.io from 1.7.4 to 2.0.1, server cannot get the message if client sent it in reconnect event handler.

Steps to reproduce (if the current behaviour is a bug)

Please reference the code: https://github.com/mingc00/socket.io-fiddle

  1. Register a asynchronous middleware
  2. Startup server
  3. Turn off server after client is connected
  4. Restart the server
  5. Server cannot get the message which is sent in client reconnect event handler.

Note: the best way to get a quick answer is to provide a failing test case, by forking the following fiddle for example.

Expected behaviour

In previous version, server should get the message which is sent in client reconnect event handler.

Setup

  • OS: Ubuntu 16.04
  • browser: Chrome 58
  • socket.io version: 2.0.1

Other information (e.g. stacktraces, related issues, suggestions how to fix)

@adrai

This comment has been minimized.

adrai commented May 10, 2017

same issue even if directly emitting a message in the connect event handler

@darrachequesne

This comment has been minimized.

Member

darrachequesne commented May 10, 2017

@mingc00 thanks for the fiddle, I could indeed reproduce.

It seems to be related to #2833, the CONNECT packet is sent too early.

@adrai

This comment has been minimized.

adrai commented May 15, 2017

same issue as: #2866

@darrachequesne darrachequesne referenced this issue May 20, 2017

Merged

fix timing issues with middleware #2948

1 of 5 tasks complete

@darrachequesne darrachequesne added this to the 2.0.2 milestone Jun 1, 2017

@mxq19901028

This comment has been minimized.

mxq19901028 commented Jan 13, 2018

How to ignore the LTS certificate problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment