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

expose ws creation func #7

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

VargaElod23
Copy link

@VargaElod23 VargaElod23 commented Nov 3, 2022

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines: CONTRIBUTING.md
  • Tests for the changes have been added (for bug fixes / features) -> not necessary as it is only a func exposure
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix

  • Feature

  • Code style update (formatting, local variables)

  • Refactoring (no functional changes, no api changes)

  • Build related changes

  • CI related changes

  • Other... Please describe:

  • I exposed the ws creation function so that recreating the connection is possible in a module-friendly way. As Nest.JS doesn't support runtime recreation of whole modules this is the only way to instantiate WS connection like the guys asked in Reconnect when connect closed #5 . We ran in the same issue, thus the fix. If this method is exposed we can use it on-demand(like onClose just recreate it).

What is the current behavior?

Issue Number: #5 .

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@0xslipk 0xslipk self-requested a review January 10, 2023 10:42
@jmoratat
Copy link

Can you review the PR please? It would be very interesting use it to implement a reconnect policy when losing the connection to the websocket server.

@VargaElod23
Copy link
Author

@JorgeMorata just use https://github.com/Taraxa-project/nestjs-websocket until

@jmoratat
Copy link

jmoratat commented Aug 30, 2023

@JorgeMorata just use https://github.com/Taraxa-project/nestjs-websocket until

Could you make it platform-agnostic please? ('build' fails due to the 'rm" command). Thank u so much!

@LeoLTM
Copy link

LeoLTM commented Aug 30, 2023

@JorgeMorata just use https://github.com/Taraxa-project/nestjs-websocket until

Could you make it platform-agnostic please? ('build' fails due to the 'rm" command). Thank u so much!

@JorgeMorata you can set git bash as default shell for running npm scripts. This will fix the issue with the rm command. Just make sure to enter the right path to your git bash (the one from the linked answer was not suitable for my installation).

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.

4 participants