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

websockets(bug) send message to client only in open state #1183

Merged
merged 1 commit into from Oct 17, 2018

Conversation

spaiter
Copy link

@spaiter spaiter commented Oct 10, 2018

sending messages to ws client only if it in open state

no breaking changes

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@coveralls
Copy link

Pull Request Test Coverage Report for Build 1137

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.007%) to 93.698%

Totals Coverage Status
Change from base Build 1136: 0.007%
Covered Lines: 2683
Relevant Lines: 2805

💛 - Coveralls

@coveralls
Copy link

coveralls commented Oct 10, 2018

Pull Request Test Coverage Report for Build 1138

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 93.692%

Totals Coverage Status
Change from base Build 1136: 0.0%
Covered Lines: 2679
Relevant Lines: 2801

💛 - Coveralls

export const CONNECTING_STATE = 0;
export const OPEN_STATE = 1;
export const CLOSING_STATE = 2;
export const CLOSED_STATE = 3;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is related only to ws library, specifically to ws-adapter, I would suggest moving these const variables into ws-adapter.ts file.

sending messages to ws client only if it in open state

no breaking changes
@spaiter
Copy link
Author

spaiter commented Oct 11, 2018

Fixed

@kamilmysliwiec kamilmysliwiec merged commit 72a8725 into nestjs:master Oct 17, 2018
@kamilmysliwiec
Copy link
Member

Thanks!

@lock
Copy link

lock bot commented Sep 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants