close old connection when new comes