expose ws creation func - #7
VargaElod23 wants to merge 3 commits into
Conversation
|
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. |
|
@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 |
PR Checklist
Please check if your PR fulfills the following requirements:
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
onClosejust recreate it).What is the current behavior?
Issue Number: #5 .
What is the new behavior?
Does this PR introduce a breaking change?
Other information