Close db on failed connect so node can exit.