make mongo close the connection