Close tcp connection after failed connection