only creating connection if is null or closed. Only closing it to create a new one.