Skip to content

[IMPROVEMENT]: Add a promise to the intializeServer #17

@aeciolevy

Description

@aeciolevy

The problem is that if you have any resource or tool that needs to run an async operation through a callback or a promise, you can run into an issue like this:

unhandledRejection: Error: Cannot register capabilities after connecting to transport

One way to handle this is bypassing the server with the necessary capabilities upfront.
Alternatively, we could pass a callback or a promise handler that can manage this situation gracefully to invoke the connection with transport after the async operation is out of the stack.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions