Skip to content
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

Fix https://github.com/HenningM/express-ws/issues/64 by setting a str… #92

Merged
merged 1 commit into from
Jun 6, 2018

Conversation

mdvanes
Copy link
Contributor

@mdvanes mdvanes commented Apr 2, 2018

…ing in the _header property of the response.

I also ran into this issue: #64
According to dougwilson #64 (comment) who seems to be an Express maintainer, the problem was this missing property.

Now, I have done this patch without a thorough understanding of your library, and without diving deeply into dougwilson's answer, but it seems to fix the problem for me.

Maybe this will help some other people, too.

@HenningM HenningM merged commit 0ae2ecb into HenningM:master Jun 6, 2018
@salzig
Copy link

salzig commented Mar 18, 2020

just as a note, i still get this error, unless i move the dummyREsponse._header out and before the conditional.

like so:

      dummyResponse._header = '';
      if (statusCode > 200) {
        /* Something in the middleware chain signalled an error. */	        /* Something in the middleware chain signalled an error. */
        socket.close();	        socket.close();
      }

@mdvanes
Copy link
Contributor Author

mdvanes commented Mar 20, 2020

This was merged and I have been using version 4.x in production ever since and that solved my issue. @salzig Could you log the value of statusCode? Maybe you get an sub 200 code or (more likely) an undefined?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants