Skip to content

HocuspocusProviderWebsocket always connects when we create an instance. #938

@Ayrat-Kh

Description

@Ayrat-Kh

Description
There is no way preventing websocket provider from the initial connection.

Steps to reproduce the bug
Steps to reproduce the behavior:

  1. Create an instance of HocuspocusProviderWebsocket.
  2. Socket will start auto-conenction.

Expected behavior
There should an option to create in instance without auto connection. Otherwise the condition

if (!this.shouldConnect) {
    return;
}

doesn't make any sense.

Most likely we should be able to pass shouldConnect as a configuration.

Screenshot, video, or GIF

Image

Environment?

  • Hocuspocus version: 3.1.0

EDdt:
Additional:

I can create a PR soon, if I git confirmation that this is bug

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions