Closed brunoroquette closed 6 years ago
The connection is automatically closed by the R garbage collector when all objects that are using the connection are removed. So you could do:
rm(con)
gc()
But typically you shouldn't worry about it.
mongolite 2.0 will have a disconnect()
method to force closing the connection.
When I stop the mongo service before close the connection in my R script, the message: "Warning: [WARNING] Couldn't send "endSessions": Failure during socket delivery: Unknown error (10054)" is printed. So, I ask, is there a function to close the current connection?