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

Server connection won't close #66

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xcoderzach
Copy link
Contributor

It seems to be an issue with MongolianServer._connection not having a cached value until one of the connections callbacks is called, it fixes the issue of you call the callback right away.

it doesn't break any of the existing tests, but I couldn't think of a clever way to test this without digging into internals.

@jaekwon
Copy link

jaekwon commented Dec 20, 2011

#67

@demian85
Copy link

I don't get it, how can i close the connection? my script won't finish!

@jaekwon
Copy link

jaekwon commented Jan 23, 2012

force your script to close the server connection in a callback that actually uses one of the collections, say, listing the available indices for the collection.

      getCollection (err, collection) ->
        collection.indexes (err, indexes) ->
          server.close()

@defunctzombie
Copy link

db.server.close() or just server.close() if your have the server instance

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.

4 participants