Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing argument on next tick of dbCleanup #65

Merged
merged 1 commit into from
Jun 6, 2020

Conversation

jkiyo
Copy link
Contributor

@jkiyo jkiyo commented Jun 6, 2020

This PR fixes a problem I encountered when the next tick of dbCleanup runs.

(node:4432) UnhandledPromiseRejectionWarning: TypeError: Cannot set property 'nextDbCleanup' of undefined
    at C:\Dev\sample_app\node_modules\connect-session-knex\index.js:242:31
    at <anonymous>
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:4432) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(
). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:4432) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

--- Edit ---

More debug details:

The KnexStore is defined on the first run

image

But when the next tick runs from the scheduled setTimeout the KnexStore is undefined:

image

@omarryhan
Copy link
Collaborator

Whoops, must've missed that in my last PR. Thank you for contributing :)

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.

2 participants