Close and open device for each connection