Close tcp connection