Open houshengbo opened 8 years ago
To the best of my knowledge the Connection
object doesn't represent a any sort of persistent connection, it's mostly a bundle of configuration information used to make HTTP requests to service specific commands, so you generally wouldn't "close" it. If you need to forcibly close the sockets that are currently open and managed by the HttpAgent servicing the cradle "Connection" you should be able to call the close
method on the object, but it appears this doesn't apply to longpoll monitoring of the _changes feed. Those sockets appear to be handled by a different HttpAgent than the other requests made by cradle.
Hope that helps.
I have maintain multiple connection to couchdb in one of my projects.
However, after I create the connections with var db = new(cradle.Connection)().database('starwars');
how can I close the database connection???