Skip to content

Manager._state not updated after reconnect #293

Open

Description

@ClintHaerinck

When following events are emitted:

  • open
  • close
  • reconnect
    The connection _state parameter is still STATE.CLOSED from the close event.

This because when a reconnect event is emitted by the MongoClient, the Manager _state parameter isn't updated to STATE.OPEN.

Activity

  1. mathieudutour commented on Feb 8, 2020

    @mathieudutour
    Collaborator

    Ah good catch! Want to send a PR to fix it?

  2. ClintHaerinck commented on Feb 10, 2020

    @ClintHaerinck
    ContributorAuthor

    Here you are. But I don't know if it will be used for long, I read stuff about unified topology. When I enable the 'useUnifiedTopology' option, the events aren't working anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions