Skip to content

[Mongoose V7] : Connection.prototype.close() no longer accepts a callback #352

@thib3113

Description

@thib3113

From mongoose V7, async functions will throw an error if we pass a callback (and so will skip his job) .

I saw this async functions was added years ago (4.3.8-pre) : Automattic/mongoose@21f0104
so, I think we can migrate to full promise (removing callback) without problems .

Also, we already use promises, but, passing the "resolve" function to the callback .


Actually, stopping a moleculer service, will not close the connection ( close will throw before really closing the connection )

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