Close TCP connections after opening them