DEV Community

Discussion on: MongoDB Golang Driver Tutorial

Collapse
 
tkehayov profile image
Tihomir Kehayov

Hi Eduardo,
Do we need to close dB connection?

Collapse
 
eduardohitek profile image
Eduardo Hitek

Hi Tihomir, how are you?
Yes, when I was starting to use this Mongo Driver and creating these examples, I realized that there were some open connections left in the database. That's why is recommended to close theses connection after you execute some operation.