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

Already on GitHub? Sign in to your account

Close() requests during database connection attempts do nothing. #13

Closed
mfrobben opened this Issue Jan 1, 2013 · 1 comment

Comments

Projects
None yet
2 participants
Contributor

mfrobben commented Jan 1, 2013

If the connection hasn't yet been opened, a close() returns no error but does nothing...that's not good. I've got a pull that should fix this by adding a client.close() after all the pended requests flush.

Contributor

mfrobben commented Jan 1, 2013

(The use case here is when running a production cron job or shorter script that logs via winston with mongodb transport...the scripts can exit quickly but when winston-mongodb is set to keepAlive:true, the script cleanup routine, which calls close(), returns but the script never actually exits)

@mfrobben mfrobben pushed a commit to mfrobben/winston-mongodb that referenced this issue Jan 1, 2013

Matthew Robben Add close after flush when connection state == 'opening'. Closes #13. bba30d8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment