close handshake socket