Skip to content

Fix: callback being called twice.#44

Open
dmedina2015 wants to merge 5 commits into
willhuang85:masterfrom
dmedina2015:fix/adapter.rm
Open

Fix: callback being called twice.#44
dmedina2015 wants to merge 5 commits into
willhuang85:masterfrom
dmedina2015:fix/adapter.rm

Conversation

@dmedina2015
Copy link
Copy Markdown

This branch fixes a bug that makes cb() being called twice inside adapter.rm() function.

This was causing Parley to pop-up the following warning inside Sails:

WARNING: Something seems to be wrong with this function.
It is trying to signal that it has finished AGAIN, after
already resolving/rejecting once.
(silently ignoring this...)

- Adds support for Node14, by doing the following:
  * Update MongoDB Node Driver to latest (3.6.5)
  * Removed unecessary event emitters from adapter.receive()
  * adapter.receive() only calls 'done' callback when 'outs__' stream finishes or rise an error. Previous code was calling callback before finishing the file writing. This was causing some async problems and not passing skipper-adapter-test official tests.
  * Tests are now using official adapter by sailshq. No tweaks are needed to pass the build.
@dmedina2015
Copy link
Copy Markdown
Author

dmedina2015 commented Mar 17, 2021

Updated this PR with some updates for Node>=14. Upgraded MongoDB driver to 3.6.5 and switched test adapter for the official repo (skipper-adapter-test). Now all builds should pass. Details in this commit

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant